Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Jiawen Liu <1298662399@qq.com>
Cc: Thomas Gleixner <tglx@kernel.org>, Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH] irqchip: irq-imx-intmux: fix runtime PM cleanup
Date: Tue, 18 Aug 2026 11:24:43 -0500	[thread overview]
Message-ID: <aoSHS7OwvNt9-6Ew@SMW015318> (raw)
In-Reply-To: <tencent_62C095FCF52245E6900FBA2E4E008042BF08@qq.com>

On Tue, Aug 18, 2026 at 05:21:08PM +0400, Jiawen Liu wrote:
> Fix imx_intmux_probe lifecycle error path.
>
> Probe enables runtime PM and clock. Failures after clock enable only
> disable clock and leak PM runtime reference/enable. Clk cleanup is
> incomplete because PM runtime state is left enabled/ref held on later
> probe failures.
>
> Balance runtime PM setup on imx-intmux probe failures in
> imx_intmux_probe.
>
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c
> --- a/drivers/irqchip/irq-imx-intmux.c
> +++ b/drivers/irqchip/irq-imx-intmux.c
> @@ -240,6 +240,8 @@
>  	ret = clk_prepare_enable(data->ipg_clk);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to enable ipg clk: %d\n", ret);
> +		pm_runtime_put_noidle(&pdev->dev);
> +		pm_runtime_disable(&pdev->dev);


use devm_pm_runtime_enable() to fix this problem.

Frank

>  		return ret;
>  	}
>
> @@ -282,6 +284,8 @@
>  	return 0;
>  out:
>  	clk_disable_unprepare(data->ipg_clk);
> +	pm_runtime_put_noidle(&pdev->dev);
> +	pm_runtime_disable(&pdev->dev);
>  	return ret;
>  }
>
>
>

      parent reply	other threads:[~2026-08-18 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 13:21 [PATCH] irqchip: irq-imx-intmux: fix runtime PM cleanup Jiawen Liu
2026-08-18 13:32 ` sashiko-bot
2026-08-18 16:24 ` Frank Li [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=aoSHS7OwvNt9-6Ew@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=1298662399@qq.com \
    --cc=Frank.Li@nxp.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --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