summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/wmt-sdmmc.c
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-08 08:46:38 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 15:01:55 +0300
commit78bb1fd7f15066ee300fa5adf3af005f4b7a365c (patch)
tree5eb386d90dd0e6e16f26934fbba05e8e50a98fba /drivers/mmc/host/wmt-sdmmc.c
parent2a641e5374a486741869875a8b1a35dff6fcd669 (diff)
downloadlinux-78bb1fd7f15066ee300fa5adf3af005f4b7a365c.tar.xz
mmc: wmt-sdmmc: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/wmt-sdmmc.c')
-rw-r--r--drivers/mmc/host/wmt-sdmmc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 50fe69d9b85d..fd30ac7da5e5 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -856,7 +856,9 @@ static int wmt_mci_probe(struct platform_device *pdev)
goto fail5;
}
- clk_prepare_enable(priv->clk_sdmmc);
+ ret = clk_prepare_enable(priv->clk_sdmmc);
+ if (ret)
+ goto fail6;
/* configure the controller to a known 'ready' state */
wmt_reset_hardware(mmc);
@@ -866,6 +868,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "WMT SDHC Controller initialized\n");
return 0;
+fail6:
+ clk_put(priv->clk_sdmmc);
fail5:
free_irq(dma_irq, priv);
fail4: