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>
This commit is contained in:
Hans Verkuil 2023-05-24 13:11:48 +01:00 committed by Mauro Carvalho Chehab
parent 3df55cd773
commit 2192fa9527
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}