gpio: mlxbf2.c: Add check for bgpio_init failure
[ Upstream commit c0eee6fbfa ]
Add a check if bgpio_init fails.
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b92ac0a9ca
commit
69b14e23df
1 changed files with 5 additions and 0 deletions
|
|
@ -268,6 +268,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…
Add table
Add a link
Reference in a new issue