Re: [PATCH 3/5] mfd: arizona: Free info IRQs on probe failure

From: Lee Jones

Date: Wed Nov 18 2026 - 12:50:27 EST


Arizona people?

On Sat, 07 Nov 2026, shao.mingyin@xxxxxxxxxx wrote:

> From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
>
> arizona_dev_init() registers three informational IRQs (CLKGEN error,
> Overclocked and Underclocked) with arizona_request_irq() before adding
> the sub-devices. If mfd_add_devices() fails the error path only calls
> arizona_irq_exit(), which frees the CTRLIF_ERR/BOOT_DONE IRQs and the
> IRQ chip/domain but leaves these three requested IRQs behind; they are
> freed only in arizona_dev_exit() on the normal removal path.
>
> As a result the three threaded IRQ handlers stay registered and
> irq_dispose_mapping()/irq_domain_remove() in arizona_irq_exit() act on
> virtual IRQs that are still in use. Free them in the probe failure path
> too, in the same order as arizona_dev_exit().
>
> Fixes: 3cc729869475 ("mfd: arizona: Core driver")
> Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
> ---
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index 91975536d14d..37cba7047d76 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -1373,6 +1373,9 @@ int arizona_dev_init(struct arizona *arizona)
> return 0;
>
> err_irq:
> + arizona_free_irq(arizona, ARIZONA_IRQ_UNDERCLOCKED, arizona);
> + arizona_free_irq(arizona, ARIZONA_IRQ_OVERCLOCKED, arizona);
> + arizona_free_irq(arizona, ARIZONA_IRQ_CLKGEN_ERR, arizona);
> arizona_irq_exit(arizona);
> err_pm:
> pm_runtime_disable(arizona->dev);

--
Lee Jones