From: Asmaa Mnebhi Date: Fri, 22 Oct 2021 13:44:38 +0000 (-0400) Subject: gpio: mlxbf2.c: Add check for bgpio_init failure X-Git-Tag: accepted/tizen/unified/20230118.172025~6106^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0eee6fbfa2b3377f1efed10dad539abeb7312aa;p=platform%2Fkernel%2Flinux-rpi.git gpio: mlxbf2.c: Add check for bgpio_init failure Add a check if bgpio_init fails. Signed-off-by: Asmaa Mnebhi Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c index 177d03e..40a052b 100644 --- a/drivers/gpio/gpio-mlxbf2.c +++ b/drivers/gpio/gpio-mlxbf2.c @@ -256,6 +256,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev) NULL, 0); + if (ret) { + dev_err(dev, "bgpio_init failed\n"); + return ret; + } + gc->direction_input = mlxbf2_gpio_direction_input; gc->direction_output = mlxbf2_gpio_direction_output; gc->ngpio = npins;