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>
This commit is contained in:
Alexandru Ardelean 2020-09-16 11:22:21 +03:00 committed by Jonathan Cameron
parent 6026af6a53
commit 13ca1a1be5
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}