icm42688: Capture the spi return value

Handle the return value of the spi transaction.

Fixes #58582

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress 2024-01-04 08:04:57 -07:00 committed by Carles Cufí
commit 5edc45421a

View file

@ -99,7 +99,7 @@ int icm42688_trigger_set(const struct device *dev, const struct sensor_trigger *
data->data_ready_handler = handler;
data->data_ready_trigger = trig;
icm42688_spi_read(&cfg->spi, REG_INT_STATUS, &status, 1);
res = icm42688_spi_read(&cfg->spi, REG_INT_STATUS, &status, 1);
break;
default:
res = -ENOTSUP;