Re: [PATCH v2 2/3] mfd: arizona: Free only registered diagnostic IRQs

From: Charles Keepax

Date: Fri Nov 27 2026 - 05:30:42 EST


On Fri, Nov 27, 2026 at 12:17:38PM +0800, shao.mingyin@xxxxxxxxxx wrote:
> arizona_dev_init() requests three diagnostic IRQs before adding MFD
> children. If adding the children fails after any of those requests
> succeed, the probe error path tears down the IRQ mappings while the
> diagnostic IRQ actions are still registered.
>
> Record which requests succeed and free those IRQs before IRQ teardown
> on probe failure and on removal. Diagnostic IRQs remain optional, and
> a failed request never leads to a call to free its action.
>
> Fixes: 3cc729869475 ("mfd: arizona: Core driver")
> Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
> ---
> Changes in v2:
> - Record successful IRQ requests and share cleanup between probe
> failure and removal.

Looks fine to me:

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Personally, I probalby wouldn't have bothered to track them :-)
but it doesn't add much code, so if Lee is happy so am I.

Thanks,
Charles