Skip to contentSkip to conversation

iio: adc: ti-ads131e08: return correct error code

PATCH Applied Dixit Parmar 3 participants 3 messages Oct 11, 2025 – Oct 12, 2025 IIO

lore
Share & tools
lore
#0 lore raw

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
index b18f30d3fdbe..10330d6913df 100644
@@ -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]>
#1 lore raw

…

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

maintainer Applied
#2 lore raw
In reply to Dixit Parmar
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() 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.

Applied

Thanks,

J