summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-05-24 15:11:48 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-06-09 18:08:53 +0300
commit2192fa95276b0561a579fa4cd19de3f16d47d171 (patch)
treea131e7b44ada74a2eec791d713059e6d768e68ab /drivers/media/platform
parent3df55cd773e8603b623425cc97b05e542854ad27 (diff)
downloadlinux-2192fa95276b0561a579fa4cd19de3f16d47d171.tar.xz
media: mediatek: vpu: add missing clk_unprepare
If vpu_clock_enable() fails, then call clk_unprepare(). This fixes this smatch warning: drivers/media/platform/mediatek/vpu/mtk_vpu.c:1031 mtk_vpu_resume() warn: 'vpu->clk' from clk_prepare() not released on lines: 1020. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Yunfei Dong <yunfei.dong@mediatek.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/mediatek/vpu/mtk_vpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.c b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
index 1a95958a1f90..4c8f5296d120 100644
--- a/drivers/media/platform/mediatek/vpu/mtk_vpu.c
+++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
@@ -1018,6 +1018,7 @@ static int mtk_vpu_resume(struct device *dev)
clk_prepare(vpu->clk);
ret = vpu_clock_enable(vpu);
if (ret) {
+ clk_unprepare(vpu->clk);
dev_err(dev, "failed to enable vpu clock\n");
return ret;
}