mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08: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…
Reference in New Issue
Block a user