linux/drivers/iio/imu/bno055
Dan Carpenter dd4753f88f iio: imu: bno055: uninitialized variable bug in bno055_trigger_handler()
This bug is basically harmless, although it will trigger a runtime warning
if you use KMSan.  On the first iteration through the loop, the
"best_delta" variable is uninitialized so re-order the condition to
prevent reading uninitialized memory.

Fixes: 4aefe1c2bd ("iio: imu: add Bosch Sensortec BNO055 core driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/Y0kuaO9PQkSQja+A@kili
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-11-01 08:48:13 +00:00
..
bno055_i2c.c iio: imu: add BNO055 I2C driver 2022-09-21 18:42:56 +01:00
bno055_ser_core.c
bno055_ser_trace.c
bno055_ser_trace.h
bno055.c iio: imu: bno055: uninitialized variable bug in bno055_trigger_handler() 2022-11-01 08:48:13 +00:00
bno055.h
Kconfig iio: imu: add BNO055 I2C driver 2022-09-21 18:42:56 +01:00
Makefile iio: imu: add BNO055 I2C driver 2022-09-21 18:42:56 +01:00