Message ID | 20230524121150.435736-3-hverkuil-cisco@xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Various smatch/sparse fixes | expand |
On Wed, 24 May 2023 14:11:44 +0200, Hans Verkuil wrote: > 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> > Cc: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> > --- > drivers/media/platform/rockchip/rga/rga.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c > index 67dcf22e5ba3..cbb33dd62fdd 100644 > --- a/drivers/media/platform/rockchip/rga/rga.c > +++ b/drivers/media/platform/rockchip/rga/rga.c > @@ -726,10 +726,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; > } > -- > 2.39.2 > >
diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 67dcf22e5ba3..cbb33dd62fdd 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -726,10 +726,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; }
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> Cc: Michael Tretter <m.tretter@pengutronix.de> --- drivers/media/platform/rockchip/rga/rga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)