From 7af0a2fcdf5ebf8ce56017c15827b8871e657f9a Mon Sep 17 00:00:00 2001 From: Gaetan Perrot Date: Wed, 21 Jan 2026 18:55:15 +0900 Subject: [PATCH] sensor: adi: adxl372: stream: check return value of adxl372_set_op_mode Check the return value of adxl372_set_op_mode() in adxl372_submit_stream() and abort on error. Fix CID: 516239 Signed-off-by: Gaetan Perrot --- drivers/sensor/adi/adxl372/adxl372_stream.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/sensor/adi/adxl372/adxl372_stream.c b/drivers/sensor/adi/adxl372/adxl372_stream.c index 0555109b802..f2b59f68b62 100644 --- a/drivers/sensor/adi/adxl372/adxl372_stream.c +++ b/drivers/sensor/adi/adxl372/adxl372_stream.c @@ -114,7 +114,10 @@ void adxl372_submit_stream(const struct device *dev, struct rtio_iodev_sqe *iode adxl372_configure_fifo(dev, current_fifo_mode, data->fifo_config.fifo_format, data->fifo_config.fifo_samples); - adxl372_set_op_mode(dev, cfg_372->op_mode); + rc = adxl372_set_op_mode(dev, cfg_372->op_mode); + if (rc < 0) { + return; + } } rc = gpio_pin_interrupt_configure_dt(&cfg_372->interrupt, GPIO_INT_EDGE_TO_ACTIVE);