Skip to content

Commit 4ed243b

Browse files
YueHaibingjic23
authored andcommitted
iio: adc: ad7793: Add missing error code in ad7793_setup()
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]>
1 parent 01fcf12 commit 4ed243b

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)