public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ade9000: fix wrong return type in streaming push
@ 2026-02-24 12:59 Giorgi Tchankvetadze
  2026-02-24 13:09 ` Miclaus, Antoniu
  2026-02-24 13:23 ` [PATCH v2] " Giorgi Tchankvetadze
  0 siblings, 2 replies; 6+ messages in thread
From: Giorgi Tchankvetadze @ 2026-02-24 12:59 UTC (permalink / raw)
  To: antoniu.miclaus, lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel,
	Giorgi Tchankvetadze

The else branch of ade9000_iio_push_streaming() incorrectly returns
IRQ_HANDLED on regmap_write failure. This function returns int (0 on
success, negative errno on failure), so IRQ_HANDLED (1) would be
misinterpreted as a non-error by callers.

Return ret instead, consistent with every other error path in the
function. Also add the missing newline in the error message.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
---
 drivers/iio/adc/ade9000.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index 5dcc26a08970..07e84c6257d4 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -786,8 +786,8 @@ static int ade9000_iio_push_streaming(struct iio_dev *indio_dev)
 		ret = regmap_write(st->regmap, ADE9000_REG_WFB_PG_IRQEN,
 				   ADE9000_MIDDLE_PAGE_BIT);
 		if (ret) {
-			dev_err_ratelimited(dev, "IRQ0 WFB write fail");
-			return IRQ_HANDLED;
+			dev_err_ratelimited(dev, "IRQ0 WFB write fail\n");
+			return ret;
 		}
 
 		ade9000_configure_scan(indio_dev, ADE9000_REG_WF_BUFF);
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-24 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 12:59 [PATCH] iio: adc: ade9000: fix wrong return type in streaming push Giorgi Tchankvetadze
2026-02-24 13:09 ` Miclaus, Antoniu
2026-02-24 14:49   ` Andy Shevchenko
2026-02-24 13:23 ` [PATCH v2] " Giorgi Tchankvetadze
2026-02-24 13:30   ` Miclaus, Antoniu
2026-02-24 14:47   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox