Files
linux/drivers
Alexandru Ardelean 454face064 iio: imu: adis16480: make sure provided frequency is positive
commit 24e1eb5c0d upstream.

It could happen that either `val` or `val2` [provided from userspace] is
negative. In that case the computed frequency could get a weird value.

Fix this by checking that neither of the 2 variables is negative, and check
that the computed result is not-zero.

Fixes: e4f9593901 ("iio: imu: adis16480 switch sampling frequency attr to core support")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-12 19:15:45 +01:00
..
2019-10-05 12:30:36 +02:00
2019-10-07 18:53:16 +02:00
2019-11-12 19:15:40 +01:00
2019-10-29 09:15:26 +01:00
2019-09-16 08:19:34 +02:00
2019-10-17 13:42:10 -07:00