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:
parent
6026af6a53
commit
13ca1a1be5
|
@ -324,7 +324,7 @@ static int ad9467_setup(struct ad9467_state *st, unsigned int chip_id)
|
||||||
AN877_ADC_OUTPUT_MODE_TWOS_COMPLEMENT;
|
AN877_ADC_OUTPUT_MODE_TWOS_COMPLEMENT;
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue