aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_printf.c
diff options
context:
space:
mode:
authorAlexandru Ardelean <[email protected]>2019-10-08 14:15:37 +0000
committerJonathan Cameron <[email protected]>2019-10-12 13:14:45 +0000
commit24e1eb5c0d78cfb9750b690bbe997d4d59170258 (patch)
tree066ac4f07a773e1173bf2e2339e8c974d5fab0c5 /lib/test_printf.c
parentMerge tag 'iio-fixes-for-5.4a' of https://git.kernel.org/pub/scm/linux/kernel... (diff)
downloadkernel-24e1eb5c0d78cfb9750b690bbe997d4d59170258.tar.gz
kernel-24e1eb5c0d78cfb9750b690bbe997d4d59170258.zip
iio: imu: adis16480: make sure provided frequency is positive
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 <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'lib/test_printf.c')
0 files changed, 0 insertions, 0 deletions