Skip to content

Commit 9c46e3a

Browse files
Dan Carpenterjic23
authored andcommitted
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: 0b76ff4 ("iio: adc: Add support for AD7091R-8") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Marcelo Schmitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 5959851 commit 9c46e3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ad7091r8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
195195
st->reset_gpio = devm_gpiod_get_optional(st->dev, "reset",
196196
GPIOD_OUT_HIGH);
197197
if (IS_ERR(st->reset_gpio))
198-
return dev_err_probe(st->dev, PTR_ERR(st->convst_gpio),
198+
return dev_err_probe(st->dev, PTR_ERR(st->reset_gpio),
199199
"Error on requesting reset GPIO\n");
200200

201201
if (st->reset_gpio) {

0 commit comments

Comments
 (0)