[PATCH] gpio: lpc32xx: check devm_gpiochip_add_data() return value
Vladimir Zapolskiy
vz at mleia.com
Thu Oct 15 00:02:32 PDT 2026
On 10/14/26 23:43, Jayaraj Devaraj wrote:
> lpc32xx_gpio_probe() registers each gpio chip with
> devm_gpiochip_add_data() but ignores the return value. If registering
> a chip fails, probe still returns 0, so the driver binds with a chip
> missing and no error is reported.
>
> Check the return value, print an error naming the failing chip and
> return the error code. Chips registered earlier in the loop are devm
> managed and are removed automatically on failure.
>
> Signed-off-by: Jayaraj Devaraj <jayarajdmit at gmail.com>
Thank you for the change!
Reviewed-by: Vladimir Zapolskiy <vz at mleia.com>
--
Best wishes,
Vladimir
More information about the linux-arm-kernel
mailing list