Commit 78bb1fd7 authored by Arvind Yadav's avatar Arvind Yadav Committed by Ulf Hansson

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 2a641e53
...@@ -856,7 +856,9 @@ static int wmt_mci_probe(struct platform_device *pdev) ...@@ -856,7 +856,9 @@ static int wmt_mci_probe(struct platform_device *pdev)
goto fail5; 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 */ /* configure the controller to a known 'ready' state */
wmt_reset_hardware(mmc); wmt_reset_hardware(mmc);
...@@ -866,6 +868,8 @@ static int wmt_mci_probe(struct platform_device *pdev) ...@@ -866,6 +868,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "WMT SDHC Controller initialized\n"); dev_info(&pdev->dev, "WMT SDHC Controller initialized\n");
return 0; return 0;
fail6:
clk_put(priv->clk_sdmmc);
fail5: fail5:
free_irq(dma_irq, priv); free_irq(dma_irq, priv);
fail4: fail4:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment