Re: (subset) [PATCH v3 0/8] gpiolib: scope-based management and cleanup for GPIO descriptor arrays

From: Bartosz Golaszewski

Date: Mon Nov 09 2026 - 04:33:18 EST



On Thu, 05 Nov 2026 22:30:14 -0800, Dmitry Torokhov wrote:
> This series fixes a GPIO descriptor leak and a fast-path cancellation
> bug in gpiod_get_array(), fixes the !CONFIG_OF_GPIO stub for
> of_gpio_count() to return -ENOENT instead of 0, introduces
> DEFINE_FREE() scope-based cleanup helpers for GPIO descriptors
> (gpiod_put and gpiod_put_array), converts gpiod_get_array() to use
> them, reworks descriptor array allocation to avoid krealloc(),
> switches fastpath bitmaps in struct gpio_array to bitmap_zalloc()
> and bitmap_free(), and uses the %*pb format specifier when printing
> array masks.
>
> [...]

Queueing this for fixes first.

[1/8] gpiolib: fix GPIO descriptor leak in gpiod_get_array()
https://git.kernel.org/brgl/c/b2a161687acdc297aa91fec7fa0966b5aecf0d16
[2/8] gpiolib: fix fast-path cancellation in gpiod_get_array()
https://git.kernel.org/brgl/c/51c85306270972f672737dc5e28332e2b41b26f1
[3/8] gpiolib: of: return -ENOENT from of_gpio_count() stub
https://git.kernel.org/brgl/c/e20e4b8cda2b4d7dd32dbd2c0875a15d92545f04

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>