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

mmc: sdhci-bcm-kona: fix error return code in sdhci_bcm_kona_probe()

In clk_set_rate() or clk_prepare_enable() error handling case, the
error return code ret is not set, so sdhci_bcm_kona_probe() return
0 in those error cases.
Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
Acked-by: NRay Jui <ray.jui@broadcom.com>
Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 41f469ca
......@@ -253,12 +253,14 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev)
goto err_pltfm_free;
}
if (clk_set_rate(pltfm_priv->clk, host->mmc->f_max) != 0) {
ret = clk_set_rate(pltfm_priv->clk, host->mmc->f_max);
if (ret) {
dev_err(dev, "Failed to set rate core clock\n");
goto err_pltfm_free;
}
if (clk_prepare_enable(pltfm_priv->clk) != 0) {
ret = clk_prepare_enable(pltfm_priv->clk);
if (ret) {
dev_err(dev, "Failed to enable core clock\n");
goto err_pltfm_free;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册