The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure
@ 2021-10-22 13:44 Asmaa Mnebhi
  2021-10-25  8:15 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Asmaa Mnebhi @ 2021-10-22 13:44 UTC (permalink / raw)
  To: bgolaszewski, linux-gpio, linux-kernel
  Cc: Asmaa Mnebhi, andy.shevchenko, linus.walleij

Add a check if bgpio_init fails.

Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
---
 drivers/gpio/gpio-mlxbf2.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
index 177d03ef4529..40a052bc6784 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;
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-25  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 13:44 [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure Asmaa Mnebhi
2021-10-25  8:15 ` Bartosz Golaszewski
2021-10-25  9:31   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox