Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 12660138 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron
Browse files

iio:gyro: adis16136: divide by zero in write_frequency()



It's slightly cleaner to use kstrtouint() because we pass unsigned ints
to adis16136_set_freq().  On 64 bit systems, if the user passed LONG_MIN
then it we would get past the test against zero but crash in
adis16136_set_freq() because we truncate the high bits away.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-By: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bc0a409c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment