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 <gaetan.perrot@spacecubics.com>
This commit is contained in:
Gaetan Perrot
2026-01-21 18:55:15 +09:00
committed by Alberto Escolar
parent ed545d2302
commit 7af0a2fcdf

View File

@@ -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);