public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: accel: adxl313: add missing error check in predisable
@ 2026-03-12 11:20 Antoniu Miclaus
  2026-03-13  9:41 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Antoniu Miclaus @ 2026-03-12 11:20 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Lucas Stankus,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lothar Rubusch, Mircea Caprioru, Alexandru Tachici, linux-iio,
	linux-kernel
  Cc: Antoniu Miclaus

Check the return value of the FIFO bypass regmap_write() before
proceeding to disable interrupts.

Fixes: ff8093fa6ba4 ("iio: accel: adxl313: add buffered FIFO watermark with interrupt handling")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/iio/accel/adxl313_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/accel/adxl313_core.c b/drivers/iio/accel/adxl313_core.c
index 9f5d4d2cb325..83dcac17a042 100644
--- a/drivers/iio/accel/adxl313_core.c
+++ b/drivers/iio/accel/adxl313_core.c
@@ -998,6 +998,8 @@ static int adxl313_buffer_predisable(struct iio_dev *indio_dev)
 
 	ret = regmap_write(data->regmap, ADXL313_REG_FIFO_CTL,
 			   FIELD_PREP(ADXL313_REG_FIFO_CTL_MODE_MSK, ADXL313_FIFO_BYPASS));
+	if (ret)
+		return ret;
 
 	ret = regmap_write(data->regmap, ADXL313_REG_INT_ENABLE, 0);
 	if (ret)
-- 
2.43.0


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 11:20 [PATCH] iio: accel: adxl313: add missing error check in predisable Antoniu Miclaus
2026-03-13  9:41 ` Andy Shevchenko
2026-03-22 11:48   ` Jonathan Cameron

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