All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, Jacob Chen <jacob-chen@iotwrt.com>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: Re: [PATCH 2/8] media: rockchip: rga: fix clock cleanup
Date: Thu, 25 May 2023 10:17:40 +0200	[thread overview]
Message-ID: <20230525081740.GF9943@pengutronix.de> (raw)
In-Reply-To: <20230524121150.435736-3-hverkuil-cisco@xs4all.nl>

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

  reply	other threads:[~2023-05-25  8:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 12:11 [PATCH 0/8] Various smatch/sparse fixes Hans Verkuil
2023-05-24 12:11 ` [PATCH 1/8] staging: media: atomisp: initialize settings to 0 Hans Verkuil
2023-05-24 16:04   ` Hans de Goede
2023-05-25  7:18     ` Hans Verkuil
2023-05-24 12:11 ` [PATCH 2/8] media: rockchip: rga: fix clock cleanup Hans Verkuil
2023-05-25  8:17   ` Michael Tretter [this message]
2023-05-24 12:11 ` [PATCH 3/8] media: usb: as102: drop as102_dev NULL check Hans Verkuil
2023-05-24 12:11 ` [PATCH 4/8] media: platform: renesas-ceu: drop buf " Hans Verkuil
2023-05-25 13:43   ` Jacopo Mondi
2023-05-24 12:11 ` [PATCH 5/8] media: platform: mediatek: vpu: fix NULL ptr dereference Hans Verkuil
2023-05-24 12:11 ` [PATCH 6/8] media: mediatek: vpu: add missing clk_unprepare Hans Verkuil
2023-05-24 12:11 ` [PATCH 7/8] media: pci: tw686x: no need to check 'next' Hans Verkuil
2023-05-24 12:11 ` [PATCH 8/8] staging: media: atomisp: move up sanity checks Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230525081740.GF9943@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacob-chen@iotwrt.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.