Commit 1a9b63b3 authored by Ladislav Michl's avatar Ladislav Michl Committed by james toy

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.
Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 271eec68
...@@ -1459,8 +1459,10 @@ static int __init mmc_omap_probe(struct platform_device *pdev) ...@@ -1459,8 +1459,10 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
goto err_ioremap; goto err_ioremap;
host->iclk = clk_get(&pdev->dev, "ick"); 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; goto err_free_mmc_host;
}
clk_enable(host->iclk); clk_enable(host->iclk);
host->fclk = clk_get(&pdev->dev, "fck"); host->fclk = clk_get(&pdev->dev, "fck");
...@@ -1500,10 +1502,8 @@ err_free_irq: ...@@ -1500,10 +1502,8 @@ err_free_irq:
err_free_fclk: err_free_fclk:
clk_put(host->fclk); clk_put(host->fclk);
err_free_iclk: err_free_iclk:
if (host->iclk != NULL) { clk_disable(host->iclk);
clk_disable(host->iclk); clk_put(host->iclk);
clk_put(host->iclk);
}
err_free_mmc_host: err_free_mmc_host:
iounmap(host->virt_base); iounmap(host->virt_base);
err_ioremap: err_ioremap:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment