Commit 254f3337 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Jacob Chen <jacob-chen@iotwrt.com>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: default avatarMichael Tretter <m.tretter@pengutronix.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f7c48736
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment