[PATCH] gpio: Return -ENODEV if gpio_hog_lookup_name() is empty

Tom Rini trini at konsulko.com
Thu Nov 6 17:59:43 CET 2025


On Fri, 24 Oct 2025 14:52:45 +0200, Wolfgang Wallner wrote:

> If CONFIG_GPIO_HOG is not set, then gpio_hog_lookup_name() is empty,
> and thus does not initialize any of its parameters. It does still
> return 0 though, and so any calling function might assume that the
> parameters have been initialized successfully.
> 
> Change the return value to -ENODEV in this case, as the function
> would in the case when CONFIG_GPIO_HOG is set but the gpio hog
> could not be found.
> 
> [...]

Applied to u-boot/master, thanks!

[1/1] gpio: Return -ENODEV if gpio_hog_lookup_name() is empty
      commit: 854901ccd43a2f547d2bf090456214c6033144c5
-- 
Tom




More information about the U-Boot mailing list