summaryrefslogtreecommitdiff
path: root/drivers/media/platform/rockchip/rga/rga.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-05-24 13:11:44 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-06-09 16:07:03 +0100
commit254f3337ce2575bf94f1fb40cc40fdbc70371116 (patch)
tree0f1f24eb0023fbaae6983cf5aa3f37f644169e22 /drivers/media/platform/rockchip/rga/rga.c
parentf7c487366b3a82ced30923e591aaab0cdf1e4199 (diff)
media: rockchip: rga: fix clock cleanup
Fix this smatch warning: drivers/media/platform/rockchip/rga/rga.c:734 rga_enable_clocks() warn: 'rga->sclk' from clk_prepare_enable() not released on lines: 734. The reason is that aclk should be disabled/unprepared before sclk, instead of the other way around. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Jacob Chen <jacob-chen@iotwrt.com> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/rockchip/rga/rga.c')
-rw-r--r--drivers/media/platform/rockchip/rga/rga.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index e4b8ce9ab3c6..f1c532a5802a 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -723,10 +723,10 @@ static int rga_enable_clocks(struct rockchip_rga *rga)
return 0;
-err_disable_sclk:
- clk_disable_unprepare(rga->sclk);
err_disable_aclk:
clk_disable_unprepare(rga->aclk);
+err_disable_sclk:
+ clk_disable_unprepare(rga->sclk);
return ret;
}