staging:iio:adis16260: Add value range check for calibscale/-bias
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Aug 2013 17:41:20 +0000 (18:41 +0100)
commitf4f87d04116ab2f1419f1e85c1c9504536858b88
tree9e730d0d6d639f2f0aa1b58c06526c776c5fe0d4
parent988c79a95e30dac019777e818cbfab6fdc4057b4
staging:iio:adis16260: Add value range check for calibscale/-bias

Instead of just cutting of the upper bits of the value make sure that the value
is in the valid range and return an error if it is not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/gyro/adis16260_core.c