iio: adc: ti-ads131e08: return correct error code
PATCH 1/1 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.
---
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.
--- drivers/iio/adc/ti-ads131e08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-ads131e08.c +1 -1
@@ -852,7 +852,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);
---
base-commit: 07e27ad16399afcd693be20211b0dfae63e0615f
change-id: 20251011-ret_val-3186236b240f
Best regards,
Signature · 1 line
Dixit Parmar <[email protected]>
…
Quoted 1 line
This change makes …
Will another imperative wording approach become more helpful for an improved change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17#n94
How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17#n145
Regards,
Markus
Quoted 7 lines · On Sat, 11 Oct 2025 13:41:49 +0530 Dixit Parmar <[email protected]> wrote:
The error code returned from
devm_iio_trigger_register()inturniio_trigger_register()can be other than-ENOMEM. Hence return the same value as it was returned from the function call. This change makesdevm_iio_trigger_register()handling uniform with other iio drivers.Signed-off-by Dixit Parmar <[email protected]>
Applied
Thanks,
J