Re: [PATCH 2/2] gpio: davinci: allocate bank IRQ data before installing handlers

From: Linus Walleij

Date: Tue Nov 17 2026 - 16:20:56 EST


On Mon, Nov 9, 2026 at 8:48 PM Sahaj Chaudhari <sahaj123.sc@xxxxxxxxx> wrote:

> If allocation fails partway through bank setup, previously installed
> chained handlers still point at devm-managed data that is released when
> probe fails. Allocate the complete bank-data array before installing the
> first chained handler so an allocation failure leaves no handlers behind.
>
> This fixes the probe-failure path; it does not change ordinary device
> removal.
>
> Fixes: b5cf3fd827d2 ("gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip")
> Signed-off-by: Sahaj Chaudhari <sahaj123.sc@xxxxxxxxx>

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij