diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2021-04-05 14:44:41 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-07 10:36:40 +0300 |
commit | e09fe9135399807b8397798a53160e055dc6c29f (patch) | |
tree | ba6e2dd00ec9d6c89f429bf3c760303d3b1ddf1c /MAINTAINERS | |
parent | fc948409ccc1e8afe8655cee77c686eedbfbee60 (diff) | |
download | linux-e09fe9135399807b8397798a53160e055dc6c29f.tar.xz |
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: 09a642b78523 ("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>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions