Propagate error code of gpiochip_add() up the call chain. This won't do any meaningful cleanup, but at least it will make problems noticable. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- drivers/gpio/gpio-vf610.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index 2aff62be5..9ac838f3b 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -142,9 +142,8 @@ static int vf610_gpio_probe(struct device_d *dev) port->chip.base *= VF610_GPIO_PER_PORT; port->chip.dev = dev; - gpiochip_add(&port->chip); - return 0; + return gpiochip_add(&port->chip); free_port: free(port); -- 2.17.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox