mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
iio: adc: ti-ads131e08: return correct error code
The error code returned from devm_iio_trigger_register() inturn iio_trigger_register() can be other than -ENOMEM. Hence return the same value as it was returned from the function call. This change makes devm_iio_trigger_register() handling uniform with other iio drivers. Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
d34ad64672
commit
f277fe2ff5
@@ -848,7 +848,7 @@ static int ads131e08_probe(struct spi_device *spi)
|
||||
ret = devm_iio_trigger_register(&spi->dev, st->trig);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "failed to register IIO trigger\n");
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
indio_dev->trig = iio_trigger_get(st->trig);
|
||||
|
||||
Reference in New Issue
Block a user