aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiasheng Jiang <[email protected]>2022-03-08 15:14:15 +0800
committerUlf Hansson <[email protected]>2022-03-15 10:29:53 +0100
commit09e7af76db02c74f2a339b3cb2d95460fa2ddbe4 (patch)
tree8d7a2d5ac4c061828722ef4afdff0de031466698
parentd607667bb8fa2811679ed2c8a5b09d0d4da8c5b9 (diff)
mmc: davinci_mmc: Handle error for clk_enable
As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes: bbce5802afc5 ("davinci: mmc: updates to suspend/resume implementation") Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/host/davinci_mmc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 0cf646ec9a80..7138dfa065bf 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1373,8 +1373,12 @@ static int davinci_mmcsd_suspend(struct device *dev)
static int davinci_mmcsd_resume(struct device *dev)
{
struct mmc_davinci_host *host = dev_get_drvdata(dev);
+ int ret;
+
+ ret = clk_enable(host->clk);
+ if (ret)
+ return ret;
- clk_enable(host->clk);
mmc_davinci_reset_ctrl(host, 0);
return 0;