Re: [PATCH 2/8] media: rockchip: rga: fix clock cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Cc: Jacob Chen <jacob-chen@xxxxxxxxxx>
> Cc: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>
> Cc: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>

Reviewed-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>

> ---
>  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
> 
> 



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux