[PATCH] gpio: Return -ENODEV if gpio_hog_lookup_name() is empty
    Heiko Schocher 
    hs at nabladev.com
       
    Mon Oct 27 05:47:41 CET 2025
    
    
  
Hello Wolfgang,
On 24.10.25 14:52, 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.
> 
> Signed-off-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> 
> ---
> 
>   drivers/gpio/gpio-uclass.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <hs at nabladev.com>
bye,
Heiko
-- 
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: office at nabladev.com
Geschäftsführer : Stefano Babic
    
    
More information about the U-Boot
mailing list