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>
This commit is contained in:
Hans Verkuil 2023-05-24 13:11:44 +01:00 committed by Mauro Carvalho Chehab
parent f7c487366b
commit 254f3337ce

View File

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