Re: [PATCH] irqchip: irq-imx-intmux: fix runtime PM cleanup

Frank Li <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,dev.linux.lists.imx,org.kernel.vger.linux-kernel
Message-ID <aoSHS7OwvNt9-6Ew@SMW015318>
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 <[email protected]>
> ---
> 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;
>  }
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.