summaryrefslogtreecommitdiff
path: root/include/linux/flex_array.h
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2019-10-08 17:15:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-12 19:13:20 +0100
commitc1bbd9808c4072302b1bf65a46f2953a3d7ed3b6 (patch)
tree8ba45014f57aa130778d96220d65b3ba32fa8897 /include/linux/flex_array.h
parent2c5e0e605073445ea22bb3bd55eac9df9803a08c (diff)
iio: imu: adis16480: make sure provided frequency is positive
commit 24e1eb5c0d78cfb9750b690bbe997d4d59170258 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: e4f959390178 ("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>
Diffstat (limited to 'include/linux/flex_array.h')
0 files changed, 0 insertions, 0 deletions