From: Radu Rendec <radu@rendec.net>
To: Fabio Estevam <festevam@gmail.com>, tglx@kernel.org
Cc: Frank.Li@nxp.com, imx@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] irqchip: imx-irqsteer: Convert to devm_pm_runtime_enable()
Date: Sat, 01 Aug 2026 14:54:29 -0400 [thread overview]
Message-ID: <f124515c087a5e7259c2ecc90a0f6e47a7619f4c.camel@rendec.net> (raw)
In-Reply-To: <5ee0c572d017ca3ee3503c4e1901b8ac5d4f5966.camel@rendec.net>
On Wed, 2026-07-29 at 22:22 -0400, Radu Rendec wrote:
> On Wed, 2026-07-29 at 19:14 -0300, Fabio Estevam wrote:
> > imx_irqsteer_probe() enables runtime PM, but imx_irqsteer_remove()
> > does not disable it.
> >
> > Consequently, runtime PM remains enabled after unbinding the device,
> > and rebinding it triggers:
> >
> > Unbalanced pm_runtime_enable!
> >
> > Use devm_pm_runtime_enable() to automatically disable runtime PM when
> > the device is removed.
> >
> > Fixes: 4730d2233311 ("irqchip/imx-irqsteer: Add runtime PM support")
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
> > ---
> > Changes since v1:
> > - Use devm_pm_runtime_enable() (Frank)
> >
> > drivers/irqchip/irq-imx-irqsteer.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> > index 87b07f517be3..ba1203d3edd4 100644
> > --- a/drivers/irqchip/irq-imx-irqsteer.c
> > +++ b/drivers/irqchip/irq-imx-irqsteer.c
> > @@ -263,7 +263,9 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
> > platform_set_drvdata(pdev, data);
> >
> > pm_runtime_set_active(&pdev->dev);
> > - pm_runtime_enable(&pdev->dev);
> > + ret = devm_pm_runtime_enable(&pdev->dev);
> > + if (ret)
> > + goto out;
> >
> > return 0;
> > out:
>
> Reviewed-by: Radu Rendec <radu@rendec.net>
I take that back. At a closer look, I think both issues identified by
Sashiko are valid. While the second issue is marked as "pre-existing",
the proposed patch introduces a new path where the issue can occur
(leaking the irq domain).
While at it, I would also fix the existing issue that the bot
identified, where the domain is leaked on this path:
if (!data->irq_count || data->irq_count > CHAN_MAX_OUTPUT_INT) {
ret = -EINVAL;
goto out;
}
next prev parent reply other threads:[~2026-08-01 18:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 22:14 Fabio Estevam
2026-07-30 2:22 ` Radu Rendec
2026-08-01 18:54 ` Radu Rendec [this message]
2026-08-04 11:09 ` Fabio Estevam
2026-08-05 16:00 ` Radu Rendec
2026-07-30 14:52 ` Frank Li
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=f124515c087a5e7259c2ecc90a0f6e47a7619f4c.camel@rendec.net \
--to=radu@rendec.net \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@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
all inboxes | Powered by JetHome®