aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2023-05-24 13:11:44 +0100
committerMauro Carvalho Chehab <[email protected]>2023-06-09 16:07:03 +0100
commit254f3337ce2575bf94f1fb40cc40fdbc70371116 (patch)
tree0f1f24eb0023fbaae6983cf5aa3f37f644169e22
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 <[email protected]> Cc: Jacob Chen <[email protected]> Cc: Ezequiel Garcia <[email protected]> Reviewed-by: Michael Tretter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-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;
}