diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-09-16 10:22:21 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-16 20:15:54 +0200 |
commit | 13ca1a1be50180ccd700cff00a342156b1cdae8e (patch) | |
tree | 0b7df5f767162149e6707fa3cb0fde23f5b36626 /drivers/iio/adc | |
parent | iio: adc: ad9467: refine mismatch vs unknown chip-id messages (diff) | |
download | linux-13ca1a1be50180ccd700cff00a342156b1cdae8e.tar.xz linux-13ca1a1be50180ccd700cff00a342156b1cdae8e.zip |
iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup()
The proper error code should be ENODEV (vs EINVAL) in case the chip ID
isn't recognized.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200916082221.72851-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/ad9467.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c index 9c3ab46e4d88..f068256cfca9 100644 --- a/drivers/iio/adc/ad9467.c +++ b/drivers/iio/adc/ad9467.c @@ -324,7 +324,7 @@ static int ad9467_setup(struct ad9467_state *st, unsigned int chip_id) AN877_ADC_OUTPUT_MODE_TWOS_COMPLEMENT; return 0; default: - return -EINVAL; + return -ENODEV; } } |