Commit 09e7af76 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Ulf Hansson

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: bbce5802 ("davinci: mmc: updates to suspend/resume implementation")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220308071415.1093393-1-jiasheng@iscas.ac.cnSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent d607667b
......@@ -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;
......
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