OSDN Git Service

iio: imu: adis: check ret val for non-zero vs less-than-zero
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 1 Nov 2019 09:35:00 +0000 (11:35 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 Nov 2019 10:29:25 +0000 (10:29 +0000)
commit6a39ab3b195c125d3fe49d0b0b613c2e1dbbc5a2
tree2f91043d89c8d5a42865fd98a5625b7b0e83566d
parent92c7529fc1bf3e607ed90c941e55bc244e04a256
iio: imu: adis: check ret val for non-zero vs less-than-zero

The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).

This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis.c