Skip to content

Commit 62556a7

Browse files
YueHaibinggregkh
authored andcommitted
iio: adc: ad7793: Add missing error code in ad7793_setup()
commit 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 upstream. Set error code while device ID query failed. Fixes: 88bc305 ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC") Signed-off-by: YueHaibing <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3cd5f50 commit 62556a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iio/adc/ad7793.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
279279
id &= AD7793_ID_MASK;
280280

281281
if (id != st->chip_info->id) {
282+
ret = -ENODEV;
282283
dev_err(&st->sd.spi->dev, "device ID query failed\n");
283284
goto out;
284285
}

0 commit comments

Comments
 (0)