Re: [PATCH] power: supply: generic-adc-battery: Propagate charged GPIO errors

From: Linus Walleij

Date: Fri Oct 09 2026 - 08:21:36 EST


On Fri, Oct 9, 2026 at 1:24 PM <phucduc.bui@xxxxxxxxx> wrote:

> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> devm_gpiod_get_optional() may return an error pointer such as
> -EPROBE_DEFER, but gab_probe() only checks for NULL. The error
> pointer is then passed to gpiod_to_irq() and the original error,
> including -EPROBE_DEFER, is lost.
>
> Check the return value and propagate errors from the charged GPIO lookup.
>
> Fixes: b0327ffb133f ("power: supply: generic-adc-battery: Use GPIO descriptors")
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>

That's right.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij