diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-28 18:17:44 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-09-26 21:31:08 +0200 |
commit | 66fe6ac5d5e120b85c2ed310eb25b15a77c110c0 (patch) | |
tree | 1f49228f085de57c4268f0eff3cbe1df552a63bb | |
parent | mmc: moxart: fix wait_for_completion_interruptible_timeout return variable type (diff) | |
download | linux-66fe6ac5d5e120b85c2ed310eb25b15a77c110c0.tar.xz linux-66fe6ac5d5e120b85c2ed310eb25b15a77c110c0.zip |
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: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci-bcm-kona.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index e5c634bdfdd9..51dd2fd65000 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -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; } |