On 2026-08-11T10:53:10, Pranav Sanwal <[email protected]> wrote:
> gpio: delay: free already-requested GPIOs on probe failure
>
> gpio_delay_probe() requests each wrapped real GPIO in a loop and
> returns immediately if gpio_request_by_name_nodev() fails partway
> through, without freeing the GPIOs it already successfully requested.
> gpio_delay_remove() does not cover this either, since .remove is only
> called for devices that finished probing.
>
> Free what was already requested via the same gpio_delay_free_wrapped()
> helper gpio_delay_remove() uses, bounded by the number of GPIOs
> actually requested so far rather than the full gpio_count.
>
> Fixes: c866f2f197e2 ("gpio: Add GPIO delay driver")
> Suggested-by: Simon Glass <[email protected]>
> Signed-off-by: Pranav Sanwal <[email protected]>
>
> drivers/gpio/gpio-delay.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <[email protected]>

Reply via email to