Skip to content

Commit

Permalink
soc: mediatek: mtk-svs: reset svs when svs_resume() fail
Browse files Browse the repository at this point in the history
[ Upstream commit f4f8ad2 ]

Add svs reset when svs_resume() fail.

Fixes: a825d72 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()")
Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Link: https://lore.kernel.org/r/20230111074528.29354-3-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mtk-rogerlu authored and gregkh committed Mar 11, 2023
1 parent e05aa30 commit 8fc4291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/soc/mediatek/mtk-svs.c
Expand Up @@ -1614,12 +1614,16 @@ static int svs_resume(struct device *dev)

ret = svs_init02(svsp);
if (ret)
goto out_of_resume;
goto svs_resume_reset_assert;

svs_mon_mode(svsp);

return 0;

svs_resume_reset_assert:
dev_err(svsp->dev, "assert reset: %d\n",
reset_control_assert(svsp->rst));

out_of_resume:
clk_disable_unprepare(svsp->main_clk);
return ret;
Expand Down

0 comments on commit 8fc4291

Please sign in to comment.