From: Hans Verkuil Date: Wed, 24 May 2023 12:11:44 +0000 (+0100) Subject: media: rockchip: rga: fix clock cleanup X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=254f3337ce2575bf94f1fb40cc40fdbc70371116;p=linux.git 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 Cc: Jacob Chen Cc: Ezequiel Garcia Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index e4b8ce9ab3c69..f1c532a5802ac 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; }