mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 07:30:16 +00:00
gpio: mlxbf2.c: Add check for bgpio_init failure
Add a check if bgpio_init fails. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
85fe6415c1
commit
c0eee6fbfa
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user