Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62556a72 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman
Browse files

iio: adc: ad7793: Add missing error code in ad7793_setup()



commit 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 upstream.

Set error code while device ID query failed.

Fixes: 88bc3054 ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3cd5f508
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}