Re: [PATCH] gpiolib: fix lookup table matching
From: Bartosz Golaszewski
Date: Thu Jan 08 2026 - 10:38:33 EST
On Thu, 08 Jan 2026 11:23:14 +0100, Bartosz Golaszewski wrote:
> If on any iteration in gpiod_find(), gpio_desc_table_match() returns
> NULL (which is normal and expected), we never reinitialize desc back to
> ERR_PTR(-ENOENT) and if we don't find a match later on, we will return
> NULL causing a NULL-pointer dereference in users not expecting it. Don't
> initialize desc, but return ERR_PTR(-ENOENT) explicitly at the end of
> the function.
>
> [...]
Applied, thanks!
[1/1] gpiolib: fix lookup table matching
commit: 36f597bba049928004a050c132ab787ba0eba524
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>