Skip to content

Commit c0eee6f

Browse files
Asmaa Mnebhibrgl
authored andcommitted
gpio: mlxbf2.c: Add check for bgpio_init failure
Add a check if bgpio_init fails. Signed-off-by: Asmaa Mnebhi <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 85fe641 commit c0eee6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpio/gpio-mlxbf2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
256256
NULL,
257257
0);
258258

259+
if (ret) {
260+
dev_err(dev, "bgpio_init failed\n");
261+
return ret;
262+
}
263+
259264
gc->direction_input = mlxbf2_gpio_direction_input;
260265
gc->direction_output = mlxbf2_gpio_direction_output;
261266
gc->ngpio = npins;

0 commit comments

Comments
 (0)