Commit a825d72f authored by Peng Wu's avatar Peng Wu Committed by Matthias Brugger

soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()

Fix the missing clk_disable_unprepare() before return
from svs_resume() in the error handling case.
Signed-off-by: default avatarPeng Wu <wupeng58@huawei.com>
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Link: https://lore.kernel.org/r/20220623070240.63382-1-wupeng58@huawei.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 44e36d75
...@@ -1526,16 +1526,20 @@ static int svs_resume(struct device *dev) ...@@ -1526,16 +1526,20 @@ static int svs_resume(struct device *dev)
ret = reset_control_deassert(svsp->rst); ret = reset_control_deassert(svsp->rst);
if (ret) { if (ret) {
dev_err(svsp->dev, "cannot deassert reset %d\n", ret); dev_err(svsp->dev, "cannot deassert reset %d\n", ret);
return ret; goto out_of_resume;
} }
ret = svs_init02(svsp); ret = svs_init02(svsp);
if (ret) if (ret)
return ret; goto out_of_resume;
svs_mon_mode(svsp); svs_mon_mode(svsp);
return 0; return 0;
out_of_resume:
clk_disable_unprepare(svsp->main_clk);
return ret;
} }
static int svs_bank_resource_setup(struct svs_platform *svsp) static int svs_bank_resource_setup(struct svs_platform *svsp)
......
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