提交 ee9d19d4 编写于 作者: W Wei Yongjun 提交者: Ulf Hansson

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 2aa35465
...@@ -1028,9 +1028,12 @@ static int au1xmmc_probe(struct platform_device *pdev) ...@@ -1028,9 +1028,12 @@ static int au1xmmc_probe(struct platform_device *pdev)
host->clk = clk_get(&pdev->dev, ALCHEMY_PERIPH_CLK); host->clk = clk_get(&pdev->dev, ALCHEMY_PERIPH_CLK);
if (IS_ERR(host->clk)) { if (IS_ERR(host->clk)) {
dev_err(&pdev->dev, "cannot find clock\n"); dev_err(&pdev->dev, "cannot find clock\n");
ret = PTR_ERR(host->clk);
goto out_irq; 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"); dev_err(&pdev->dev, "cannot enable clock\n");
goto out_clk; goto out_clk;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册