2024-01-08 09:07:38

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup()

There is a copy and paste error so it accidentally returns ->convst_gpio
instead of ->reset_gpio. Fix it.

Fixes: 0b76ff46c463 ("iio: adc: Add support for AD7091R-8")
Signed-off-by: Dan Carpenter <[email protected]>
---
drivers/iio/adc/ad7091r8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ad7091r8.c b/drivers/iio/adc/ad7091r8.c
index 57700f124803..700564305057 100644
--- a/drivers/iio/adc/ad7091r8.c
+++ b/drivers/iio/adc/ad7091r8.c
@@ -195,7 +195,7 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
st->reset_gpio = devm_gpiod_get_optional(st->dev, "reset",
GPIOD_OUT_HIGH);
if (IS_ERR(st->reset_gpio))
- return dev_err_probe(st->dev, PTR_ERR(st->convst_gpio),
+ return dev_err_probe(st->dev, PTR_ERR(st->reset_gpio),
"Error on requesting reset GPIO\n");

if (st->reset_gpio) {
--
2.42.0



2024-01-12 02:00:37

by Marcelo Schmitt

[permalink] [raw]
Subject: Re: [PATCH] iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup()

On 01/08, Dan Carpenter wrote:
> There is a copy and paste error so it accidentally returns ->convst_gpio
> instead of ->reset_gpio. Fix it.
>
> Fixes: 0b76ff46c463 ("iio: adc: Add support for AD7091R-8")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---

Oops, that also slipped through.
Thanks for the fix.

Reviewed-by: Marcelo Schmitt <[email protected]>

> drivers/iio/adc/ad7091r8.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad7091r8.c b/drivers/iio/adc/ad7091r8.c
> index 57700f124803..700564305057 100644
> --- a/drivers/iio/adc/ad7091r8.c
> +++ b/drivers/iio/adc/ad7091r8.c
> @@ -195,7 +195,7 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
> st->reset_gpio = devm_gpiod_get_optional(st->dev, "reset",
> GPIOD_OUT_HIGH);
> if (IS_ERR(st->reset_gpio))
> - return dev_err_probe(st->dev, PTR_ERR(st->convst_gpio),
> + return dev_err_probe(st->dev, PTR_ERR(st->reset_gpio),
> "Error on requesting reset GPIO\n");
>
> if (st->reset_gpio) {
> --
> 2.42.0
>
>

2024-01-21 17:11:52

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH] iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup()

On Thu, 11 Jan 2024 23:00:22 -0300
Marcelo Schmitt <[email protected]> wrote:

> On 01/08, Dan Carpenter wrote:
> > There is a copy and paste error so it accidentally returns ->convst_gpio
> > instead of ->reset_gpio. Fix it.
> >
> > Fixes: 0b76ff46c463 ("iio: adc: Add support for AD7091R-8")
> > Signed-off-by: Dan Carpenter <[email protected]>
> > ---
>
> Oops, that also slipped through.
> Thanks for the fix.
>
> Reviewed-by: Marcelo Schmitt <[email protected]>
Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

>
> > drivers/iio/adc/ad7091r8.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ad7091r8.c b/drivers/iio/adc/ad7091r8.c
> > index 57700f124803..700564305057 100644
> > --- a/drivers/iio/adc/ad7091r8.c
> > +++ b/drivers/iio/adc/ad7091r8.c
> > @@ -195,7 +195,7 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
> > st->reset_gpio = devm_gpiod_get_optional(st->dev, "reset",
> > GPIOD_OUT_HIGH);
> > if (IS_ERR(st->reset_gpio))
> > - return dev_err_probe(st->dev, PTR_ERR(st->convst_gpio),
> > + return dev_err_probe(st->dev, PTR_ERR(st->reset_gpio),
> > "Error on requesting reset GPIO\n");
> >
> > if (st->reset_gpio) {
> > --
> > 2.42.0
> >
> >