gpio: mlxbf2.c: Add check for bgpio_init failure
PATCH 1/1 gpio: mlxbf2.c: Add check for bgpio_init failure
Add a check if bgpio_init fails.
Signed-off-by Asmaa Mnebhi <[email protected]>
--- drivers/gpio/gpio-mlxbf2.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpio/gpio-mlxbf2.c +5 -0
@@ -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;
Signature · 1 line
2.30.1
Bartosz Golaszewski
AppliedQuoted 25 lines · Asmaa Mnebhi
Add a check if
bgpio_initfails.Signed-off-by Asmaa Mnebhi <[email protected]>--- drivers/gpio/gpio-mlxbf2.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpio/gpio-mlxbf2.c +5
-1@@ -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; --
Quoted 2 lines
2.30.1
Queued for fixes, thanks!
Bart
Quoted 1 line · Bartosz Golaszewski
On Fri, Oct 22, 2021 at 3:44 PM Asmaa Mnebhi <[email protected]> wrote:
A nit-pick that may be ignored...
Quoted 9 lines
drivers/gpio/gpio-mlxbf2.c mlxbf2_gpio_probe(struct platform_device *pdev) · line 263
Quoted 9 lines
NULL, 0);drivers/gpio/gpio-mlxbf2.c +5
-0+if (ret) { +dev_err (dev,"bgpio_init failed\n" ); +return ret; + } +
...can we utilize an empty line before if (ret) { instead?
Signature · 2 lines
With Best Regards, Andy Shevchenko