Re: [PATCH 4/9] gpio: mxc: use devm action for irq_domain cleanup
From: Andy Shevchenko
Date: Sat Oct 03 2026 - 13:49:32 EST
On Sat, Oct 3, 2026 at 3:09 PM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> wrote:
> Replace the manual irq_domain_remove() error path with
> devm_add_action_or_reset(), so the IRQ domain is cleaned up
> automatically on both probe failure to eliminate the
> out_irqdomain_remove goto label.
...
> + err = devm_add_action_or_reset(&pdev->dev, mxc_gpio_irq_domain_remove, port->domain);
> + if (err)
> + goto out_bgio;
> +
We have devm_irq_domain_instantiate() and the respective wrappers.
...
> /* gpio-mxc can be a generic irq chip */
> err = mxc_gpio_init_gc(port, irq_base);
> if (err < 0)
> - goto out_irqdomain_remove;
> + goto out_bgio;
This is simply wrong. No devm_*() call should be followed by goto.
--
With Best Regards,
Andy Shevchenko