From mboxrd@z Thu Jan 1 00:00:00 1970 From: adrian.hunter@nokia.com (Adrian Hunter) Date: Fri, 6 May 2011 12:14:03 +0300 Subject: [PATCH V2 04/16] mmc: omap_hsmmc: reduce a bit the error handlers in probe() In-Reply-To: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> References: <1304673255-31634-1-git-send-email-adrian.hunter@nokia.com> Message-ID: <1304673255-31634-5-git-send-email-adrian.hunter@nokia.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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) { -- 1.7.0.4