aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Wu <[email protected]>2022-06-23 07:02:40 +0000
committerMatthias Brugger <[email protected]>2022-06-23 10:50:53 +0200
commita825d72f74a318b479da7b79ba5e1611ccfc511f (patch)
treeaaf15b69533f4b8cd96dec1e4579d8138e7b555b
parent44e36d7552760716525a8aba62a6bcbd48f3559d (diff)
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: Peng Wu <[email protected]> Reported-by: Hulk Robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
-rw-r--r--drivers/soc/mediatek/mtk-svs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index 606a00a2e57d..87e05ab51552 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -1526,16 +1526,20 @@ static int svs_resume(struct device *dev)
ret = reset_control_deassert(svsp->rst);
if (ret) {
dev_err(svsp->dev, "cannot deassert reset %d\n", ret);
- return ret;
+ goto out_of_resume;
}
ret = svs_init02(svsp);
if (ret)
- return ret;
+ goto out_of_resume;
svs_mon_mode(svsp);
return 0;
+
+out_of_resume:
+ clk_disable_unprepare(svsp->main_clk);
+ return ret;
}
static int svs_bank_resource_setup(struct svs_platform *svsp)