diff options
author | YueHaibing <yuehaibing@huawei.com> | 2021-05-14 10:02:54 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-22 09:32:36 +0200 |
commit | 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 (patch) | |
tree | 0ae9508fe1b6d38b9a1435f8f26a61b7d6e788ba /drivers/iio | |
parent | iio: adc: ad7923: Fix undersized rx buffer. (diff) | |
download | linux-4ed243b1da169bcbc1ec5507867e56250c5f1ff9.tar.xz linux-4ed243b1da169bcbc1ec5507867e56250c5f1ff9.zip |
iio: adc: ad7793: Add missing error code in ad7793_setup()
Set error code while device ID query failed.
Fixes: 88bc30548aae ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ad7793.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c index 5e980a06258e..440ef4c7be07 100644 --- a/drivers/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c @@ -279,6 +279,7 @@ static int ad7793_setup(struct iio_dev *indio_dev, id &= AD7793_ID_MASK; if (id != st->chip_info->id) { + ret = -ENODEV; dev_err(&st->sd.spi->dev, "device ID query failed\n"); goto out; } |