WSL2-Linux-Kernel/drivers/iio/imu/inv_mpu6050
Lars-Peter Clausen e09fe91353 iio: inv_mpu6050: Fully validate gyro and accel scale writes
When setting the gyro or accelerometer scale the inv_mpu6050 driver ignores
the integer part of the value. As a result e.g. all of 0.13309, 1.13309,
12345.13309, ... are accepted as a valid gyro scale and 0.13309 is the
scale that gets set in all those cases.

Make sure to check that the integer part of the scale value is 0 and reject
it otherwise.

Fixes: 09a642b785 ("Invensense MPU6050 Device Driver.")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Link: https://lore.kernel.org/r/20210405114441.24167-1-lars@metafoo.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-04-07 08:36:40 +01:00
..
Kconfig iio: imu: inv_mpu6050: Add support for MPU-6880 2021-01-09 14:25:30 +00:00
Makefile
inv_mpu_acpi.c
inv_mpu_aux.c
inv_mpu_aux.h
inv_mpu_core.c iio: inv_mpu6050: Fully validate gyro and accel scale writes 2021-04-07 08:36:40 +01:00
inv_mpu_i2c.c iio: imu: inv_mpu6050: Add support for MPU-6880 2021-01-09 14:25:30 +00:00
inv_mpu_iio.h iio: imu: inv_mpu6050: Add support for MPU-6880 2021-01-09 14:25:30 +00:00
inv_mpu_magn.c
inv_mpu_magn.h
inv_mpu_ring.c iio:imu:inv_mpu6050: Use regmap_noinc_read for fifo reads. 2020-09-21 20:01:51 +01:00
inv_mpu_spi.c iio: imu: inv_mpu6050: Add support for MPU-6880 2021-01-09 14:25:30 +00:00
inv_mpu_trigger.c iio: imu: inv_mpu6050: Use as standalone trigger 2021-03-29 11:18:45 +01:00