Re: [PATCH] gpio: lpc32xx: check devm_gpiochip_add_data() return value
From: Vladimir Zapolskiy
Date: Thu Oct 15 2026 - 03:08:21 EST
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@xxxxxxxxx>
Thank you for the change!
Reviewed-by: Vladimir Zapolskiy <vz@xxxxxxxxx>
--
Best wishes,
Vladimir