* [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure
@ 2021-10-22 13:44 Asmaa Mnebhi
2021-10-25 8:15 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Asmaa Mnebhi @ 2021-10-22 13:44 UTC (permalink / raw)
To: bgolaszewski, linux-gpio, linux-kernel
Cc: Asmaa Mnebhi, andy.shevchenko, linus.walleij
Add a check if bgpio_init fails.
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
---
drivers/gpio/gpio-mlxbf2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
index 177d03ef4529..40a052bc6784 100644
--- a/drivers/gpio/gpio-mlxbf2.c
+++ b/drivers/gpio/gpio-mlxbf2.c
@@ -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;
--
2.30.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure
2021-10-22 13:44 [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure Asmaa Mnebhi
@ 2021-10-25 8:15 ` Bartosz Golaszewski
2021-10-25 9:31 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2021-10-25 8:15 UTC (permalink / raw)
To: Asmaa Mnebhi
Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
Linux Kernel Mailing List, Andy Shevchenko, Linus Walleij
On Fri, Oct 22, 2021 at 3:44 PM Asmaa Mnebhi <asmaa@nvidia.com> wrote:
>
> Add a check if bgpio_init fails.
>
> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
> ---
> drivers/gpio/gpio-mlxbf2.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
> index 177d03ef4529..40a052bc6784 100644
> --- a/drivers/gpio/gpio-mlxbf2.c
> +++ b/drivers/gpio/gpio-mlxbf2.c
> @@ -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;
> --
> 2.30.1
>
Queued for fixes, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure
2021-10-25 8:15 ` Bartosz Golaszewski
@ 2021-10-25 9:31 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-10-25 9:31 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Asmaa Mnebhi, Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
Linux Kernel Mailing List, Linus Walleij
On Mon, Oct 25, 2021 at 11:15 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> On Fri, Oct 22, 2021 at 3:44 PM Asmaa Mnebhi <asmaa@nvidia.com> wrote:
A nit-pick that may be ignored...
> > NULL,
> > 0);
> >
> > + if (ret) {
> > + dev_err(dev, "bgpio_init failed\n");
> > + return ret;
> > + }
> > +
...can we utilize an empty line before if (ret) { instead?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 13:44 [PATCH v1 1/1] gpio: mlxbf2.c: Add check for bgpio_init failure Asmaa Mnebhi
2021-10-25 8:15 ` Bartosz Golaszewski
2021-10-25 9:31 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).