Re: [PATCH v3 6/6] gpio: delay: free already-requested GPIOs on probe failure

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTgR01mHsw9CAoUo_DT7Y1vW7fDxdi88fquWOW3VJWb4SA__10686.7393407569$1786733545$gmane$org@mail.gmail.com>
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]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.