From patchwork Fri May 6 09:14:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 761262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p469FF01005533 for ; Fri, 6 May 2011 09:15:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755483Ab1EFJPG (ORCPT ); Fri, 6 May 2011 05:15:06 -0400 Received: from smtp.nokia.com ([147.243.128.24]:45061 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755339Ab1EFJPE (ORCPT ); Fri, 6 May 2011 05:15:04 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da01.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p469ESUO017638; Fri, 6 May 2011 12:14:59 +0300 Received: from localhost.localdomain ([helruo-dhcp022207.ntc.nokia.com [172.21.22.207]]) by mgw-da01.nokia.com with RELAY id p469EHdu017428 ; Fri, 6 May 2011 12:14:31 +0300 From: Adrian Hunter To: Tony Lindgren Cc: Madhusudhan Chikkature , linux-omap Mailing List , linux-mmc Mailing List , linux-arm Mailing List , Andy Shevchenko , Adrian Hunter Subject: [PATCH V2 04/16] mmc: omap_hsmmc: reduce a bit the error handlers in probe() Date: Fri, 6 May 2011 12:14:03 +0300 Message-Id: <1304673255-31634-5-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> References: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 09:15:15 +0000 (UTC) From: Andy Shevchenko Signed-off-by: Andy Shevchenko Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index c8aab47..3121293 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2119,18 +2119,11 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) /* we start off in DISABLED state */ host->dpm_state = DISABLED; - if (clk_enable(host->iclk) != 0) { - clk_put(host->iclk); - clk_put(host->fclk); - goto err1; - } + if (clk_enable(host->iclk) != 0) + goto err2; - if (mmc_host_enable(host->mmc) != 0) { - clk_disable(host->iclk); - clk_put(host->iclk); - clk_put(host->fclk); - goto err1; - } + if (mmc_host_enable(host->mmc) != 0) + goto err3; if (cpu_is_omap2430()) { host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck"); @@ -2275,7 +2268,9 @@ err_irq_cd_init: free_irq(host->irq, host); err_irq: mmc_host_disable(host->mmc); +err3: clk_disable(host->iclk); +err2: clk_put(host->fclk); clk_put(host->iclk); if (host->got_dbclk) {