From patchwork Thu Jan 6 02:43:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 457671 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p062h6LD004055 for ; Thu, 6 Jan 2011 02:43:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753731Ab1AFCnF (ORCPT ); Wed, 5 Jan 2011 21:43:05 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:55838 "EHLO relmlor2.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664Ab1AFCnF (ORCPT ); Wed, 5 Jan 2011 21:43:05 -0500 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor2.idc.renesas.com ( SJSMS) with ESMTP id <0LEK0016VY7P3BC0@relmlor2.idc.renesas.com> for linux-sh@vger.kernel.org; Thu, 06 Jan 2011 11:43:01 +0900 (JST) Received: from relmlac2.idc.renesas.com ([10.200.69.22]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0LEK00EYRY7PH330@relmlir1.idc.renesas.com> for linux-sh@vger.kernel.org; Thu, 06 Jan 2011 11:43:01 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 51D642808F; Thu, 06 Jan 2011 11:43:01 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 1CD2228094; Thu, 06 Jan 2011 11:43:01 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id MAH17525; Thu, 06 Jan 2011 11:43:01 +0900 Date: Thu, 06 Jan 2011 11:43:00 +0900 X-IronPort-AV: E=Sophos;i="4.60,280,1291561200"; d="scan'208";a="4668348" Received: from unknown (HELO PG10870.renesas.com) ([172.30.8.159]) by relmlii2.idc.renesas.com with ESMTP; Thu, 06 Jan 2011 11:43:00 +0900 Message-id: From: Kuninori Morimoto To: Paul Mundt Cc: Magnus , Linux-SH Subject: [PATCH] ARM: mach-shmobile: ap4evb: fixup clk_put timing of fsib_clk User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 02:43:07 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 5b07952..79cdf16 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -674,9 +674,8 @@ static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) return -EIO; ret = __fsi_set_round_rate(fsib_clk, fsib_rate, enable); - clk_put(fsib_clk); if (ret < 0) - return ret; + goto fsi_set_rate_end; /* FSI DIV setting */ ret = __fsi_set_round_rate(fdiv_clk, fdiv_rate, enable); @@ -684,10 +683,14 @@ static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) /* disable FSI B */ if (enable) __fsi_set_round_rate(fsib_clk, fsib_rate, 0); - return ret; + goto fsi_set_rate_end; } - return ackmd_bpfmd; + ret = ackmd_bpfmd; + +fsi_set_rate_end: + clk_put(fsib_clk); + return ret; } static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)