From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Chen Changcheng <chenchangcheng@kylinos.cn>
Cc: dan.scally@ideasonboard.com, jacopo.mondi@ideasonboard.com,
mchehab@kernel.org, p.zabel@pengutronix.de,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: mali-c55: fix clock leak when reset deassert fails
Date: Mon, 27 Jul 2026 12:48:57 +0200 [thread overview]
Message-ID: <amc3aBU6dTistIgw@zed> (raw)
In-Reply-To: <20260724025345.32644-1-chenchangcheng@kylinos.cn>
Hi Chen
On Fri, Jul 24, 2026 at 10:53:45AM +0800, Chen Changcheng wrote:
> In __mali_c55_power_on(), if clk_bulk_prepare_enable() succeeds but
> reset_control_bulk_deassert() fails, the function returns the error
> directly without disabling the clocks. This leaves the clocks enabled
> permanently in the runtime resume path, or leaks them in the probe
> path.
>
> Fix this by calling clk_bulk_disable_unprepare() before returning the
> error.
>
> Signed-off-by: Chen Changcheng <chenchangcheng@kylinos.cn>
The issue has already been fixed by:
https://patchwork.linuxtv.org/project/linux-media/patch/20260703163503.715606-1-devnexen@gmail.com/
> ---
> 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 94a389b3f833..f28e9f4354ac 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
> @@ -698,6 +698,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.25.1
>
>
next prev parent reply other threads:[~2026-07-27 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 2:53 [PATCH] media: mali-c55: fix clock leak when reset deassert fails Chen Changcheng
2026-07-27 10:48 ` Jacopo Mondi [this message]
2026-07-28 0:47 ` [PATCH] pata_ep93xx: fix possible NULL pointer dereference in ep93xx_pata_release_dma() Chen Changcheng
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=amc3aBU6dTistIgw@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=chenchangcheng@kylinos.cn \
--cc=dan.scally@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
/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.