Re: [PATCH 1/1] irqchip/imgpdc: fix generic IRQ chip leak and missing chained handler cleanup on remove

From: Thomas Gleixner

Date: Wed Jun 17 2026 - 12:33:22 EST


On Fri, Jun 12 2026 at 16:47, fffsqian@xxxxxxx wrote:
> @@ -457,6 +457,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
>
> return 0;
> err_generic:
> + irq_domain_remove_generic_chips(priv->domain);

You can spare this call and the one below by setting
IRQ_DOMAIN_FLAG_DESTROY_GC in domain->flags. Then the core will remove
the chip when mopping up the domain.

> irq_domain_remove(priv->domain);
> return ret;
> }
> @@ -464,7 +465,14 @@ static int pdc_intc_probe(struct platform_device *pdev)
> static void pdc_intc_remove(struct platform_device *pdev)
> {
> struct pdc_intc_priv *priv = platform_get_drvdata(pdev);
> + unsigned int i;
> +
> + for (i = 0; i < priv->nr_perips; ++i)

for (unsigned int i = 0;

Thanks,

tglx