Skip to content
Commit ced15e18 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Paul Gortmaker
Browse files

iio: imu: adis16480: assign bias value only if operation succeeded



commit 9b742763 upstream.

This was found only after the whole thing with the inline functions, but
the compiler actually found something. The value of the `bias` (in
adis16480_get_calibbias()) should only be set if the read operation was
successful.

No actual known problem occurs as users of this function all
ultimately check the return value.  Hence probably not stable material.

Fixes: 2f3abe6c ("iio:imu: Add support for the ADIS16480 and similar IMUs")
Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 6891a083
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment