summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/au1xmmc.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2014-08-14 03:00:19 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 13:59:01 +0200
commitee9d19d42c6b30e464a4c748654582fc6b3ff853 (patch)
tree97619c9385ff4566f74193586f21cc3234413d94 /drivers/mmc/host/au1xmmc.c
parentmmc: dw_mmc: Make sure we don't get stuck when we get an error (diff)
downloadlinux-ee9d19d42c6b30e464a4c748654582fc6b3ff853.tar.xz
linux-ee9d19d42c6b30e464a4c748654582fc6b3ff853.zip
mmc: au1xmmc: fix error return code in au1xmmc_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/au1xmmc.c')
-rw-r--r--drivers/mmc/host/au1xmmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 9c9f6af29251..725f6a6fd89b 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1028,9 +1028,12 @@ static int au1xmmc_probe(struct platform_device *pdev)
host->clk = clk_get(&pdev->dev, ALCHEMY_PERIPH_CLK);
if (IS_ERR(host->clk)) {
dev_err(&pdev->dev, "cannot find clock\n");
+ ret = PTR_ERR(host->clk);
goto out_irq;
}
- if (clk_prepare_enable(host->clk)) {
+
+ ret = clk_prepare_enable(host->clk);
+ if (ret) {
dev_err(&pdev->dev, "cannot enable clock\n");
goto out_clk;
}