Re: [PATCH v3 RESEND] irqchip/renesas-irqc: fix generic IRQ chip leak on remove

Thomas Gleixner <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel
Message-ID <874ii9svk6.ffs@fw13>
On Wed, Jul 08 2026 at 10:09, Qingshuang Fu wrote:

Please use 'interrupts' and not 'IRQ'. This is prose text and not twitter.

> diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
> index a20a6471b0e4..a340d27dd8d7 100644
> --- a/drivers/irqchip/irq-renesas-irqc.c
> +++ b/drivers/irqchip/irq-renesas-irqc.c
> @@ -211,6 +211,7 @@ static int irqc_probe(struct platform_device *pdev)
>  	return 0;

>  err_remove_domain:
> +	irq_domain_remove_generic_chips(p->irq_domain);
>  	irq_domain_remove(p->irq_domain);
>  err_runtime_pm_disable:
>  	pm_runtime_put(dev);
> @@ -222,6 +223,7 @@ static void irqc_remove(struct platform_device *pdev)
>  {
>  	struct irqc_priv *p = platform_get_drvdata(pdev);
>  
> +	irq_domain_remove_generic_chips(p->irq_domain);
>  	irq_domain_remove(p->irq_domain);
>  	pm_runtime_put(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);

That can be simplified by doing:

     p->irq_domain->flags |= IRQ_DOMAIN_FLAG_DESTROY_GC

Thanks,

        tglx
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.