From patchwork Thu May 5 11:51:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 756822 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 p45Bqb4b019369 for ; Thu, 5 May 2011 11:52:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335Ab1EELwg (ORCPT ); Thu, 5 May 2011 07:52:36 -0400 Received: from smtp.nokia.com ([147.243.128.24]:62761 "EHLO mgw-da01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753170Ab1EELwW (ORCPT ); Thu, 5 May 2011 07:52:22 -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 p45BqGHW024964; Thu, 5 May 2011 14:52:16 +0300 Received: from localhost.localdomain ([[172.21.24.109]]) by mgw-da01.nokia.com with RELAY id p45BpO70023786 ; Thu, 5 May 2011 14:51:58 +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 10/22] mmc: omap_hsmmc: reduce a bit the error handlers in probe() Date: Thu, 5 May 2011 14:51:10 +0300 Message-Id: <1304596282-4095-11-git-send-email-adrian.hunter@nokia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> References: <1304596282-4095-1-git-send-email-adrian.hunter@nokia.com> X-Nokia-AV: Clean Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 05 May 2011 11:52:38 +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 a727bf8..7a153af 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2204,18 +2204,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"); @@ -2382,7 +2375,9 @@ err_irq: host->dma_ctrl_buf, host->dma_ctrl_buf_phy); mmc_host_disable(host->mmc); +err3: clk_disable(host->iclk); +err2: clk_put(host->fclk); clk_put(host->iclk); if (host->got_dbclk) {