diff options
| author | Lars-Peter Clausen <[email protected]> | 2021-04-05 13:44:41 +0200 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2021-04-07 08:36:40 +0100 |
| commit | e09fe9135399807b8397798a53160e055dc6c29f (patch) | |
| tree | ba6e2dd00ec9d6c89f429bf3c760303d3b1ddf1c /tools/perf/scripts/python | |
| parent | fc948409ccc1e8afe8655cee77c686eedbfbee60 (diff) | |
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 <[email protected]>
Acked-by: Jean-Baptiste Maneyrol <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions