Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: dac: ad5770r: fix error return in ad5770r_read_raw()
@ 2026-03-12 11:20 Antoniu Miclaus
  2026-03-22 11:47 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Antoniu Miclaus @ 2026-03-12 11:20 UTC (permalink / raw)
  To: Lucas Stankus, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lothar Rubusch, Mircea Caprioru, Alexandru Tachici, linux-iio,
	linux-kernel
  Cc: Antoniu Miclaus

Return the error code from regmap_bulk_read() instead of 0 so
that I/O failures are properly propagated.

Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/iio/dac/ad5770r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5770r.c b/drivers/iio/dac/ad5770r.c
index cd47cb1c685c..6027e8d88b27 100644
--- a/drivers/iio/dac/ad5770r.c
+++ b/drivers/iio/dac/ad5770r.c
@@ -322,7 +322,7 @@ static int ad5770r_read_raw(struct iio_dev *indio_dev,
 				       chan->address,
 				       st->transf_buf, 2);
 		if (ret)
-			return 0;
+			return ret;
 
 		buf16 = get_unaligned_le16(st->transf_buf);
 		*val = buf16 >> 2;
-- 
2.43.0


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

end of thread, other threads:[~2026-03-22 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 11:20 [PATCH] iio: dac: ad5770r: fix error return in ad5770r_read_raw() Antoniu Miclaus
2026-03-22 11:47 ` Jonathan Cameron

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