Skip to contentSkip to conversation

mmci-omap: remove bogus check for host->iclk

PATCH New [email protected] 1 participant 1 message Dec 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 174/196 mmci-omap: remove bogus check for host->iclk

From: Ladislav Michl <[email protected]>

Remove check for host->iclk being NULL from error path since we already know it is non-null and use return value from clk_get.

---

 drivers/mmc/host/omap.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mmc/host/omap.c renamed from drivers/mmc/host/omap.c~mmci-omap-remove-bogus-check-for-host-iclk +5 -5
diff -puN drivers/mmc/host/omap.c~mmci-omap-remove-bogus-check-for-host-iclk drivers/mmc/host/omap.c
@@ -1459,8 +1459,10 @@ static int __init mmc_omap_probe(struct 
 		goto err_ioremap;
 
 	host->iclk = clk_get(&pdev->dev, "ick");
-	if (IS_ERR(host->iclk))
+	if (IS_ERR(host->iclk)) {
+		ret = PTR_ERR(host->iclk);
 		goto err_free_mmc_host;
+	}
 	clk_enable(host->iclk);
 
 	host->fclk = clk_get(&pdev->dev, "fck");
@@ -1500,10 +1502,8 @@ err_free_irq:
 err_free_fclk:
 	clk_put(host->fclk);
 err_free_iclk:
-	if (host->iclk != NULL) {
-		clk_disable(host->iclk);
-		clk_put(host->iclk);
-	}
+	clk_disable(host->iclk);
+	clk_put(host->iclk);
 err_free_mmc_host:
 	iounmap(host->virt_base);
 err_ioremap:

_