The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: David Carlier <devnexen@gmail.com>
Cc: Daniel Scally <dan.scally@ideasonboard.com>,
	 Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: mali-c55: Fix clock leak on reset deassert failure
Date: Wed, 1 Jul 2026 09:25:09 +0200	[thread overview]
Message-ID: <akTAgKuI0CvMy1t-@zed> (raw)
In-Reply-To: <20260609113747.39592-1-devnexen@gmail.com>

Hi David

On Tue, Jun 09, 2026 at 12:37:47PM +0100, David Carlier wrote:
> __mali_c55_power_on() enables the clocks before deasserting the resets,
> but bails out on a deassert failure without disabling them again. Both
> callers treat a failed power-on as already cleaned up, so the clocks are
> left enabled.
>
> Disable them on the error path.
>
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")

Fixes need to Cc stable

> Signed-off-by: David Carlier <devnexen@gmail.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Could you please Cc: stable@vger.kernel.org on a new version so the
patch hits the stable list as well ?

Thanks
   j

> ---
>  drivers/media/platform/arm/mali-c55/mali-c55-core.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> index ee4a42674..fb81141d1 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -699,6 +699,8 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
>  					  mali_c55->resets);
>  	if (ret) {
>  		dev_err(mali_c55->dev, "failed to deassert resets\n");
> +		clk_bulk_disable_unprepare(ARRAY_SIZE(mali_c55->clks),
> +					   mali_c55->clks);
>  		return ret;
>  	}
>
> --
> 2.53.0
>
>

      parent reply	other threads:[~2026-07-01  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 11:37 [PATCH] media: mali-c55: Fix clock leak on reset deassert failure David Carlier
2026-06-10  6:50 ` Dan Scally
2026-07-01  7:25 ` Jacopo Mondi [this message]

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=akTAgKuI0CvMy1t-@zed \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=devnexen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox