]> git.baikalelectronics.ru Git - kernel.git/commit
iio: Fix iio_read_channel_processed_scale()
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Mar 2021 12:27:05 +0000 (13:27 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:35:51 +0000 (08:35 +0100)
commite3dd9bc257d227de49fe84e3af9fdbdfffa7a634
tree9cea6307a5e1c1172c448008cc6b026adeb885c6
parentaefc26638241c7e39d010c72c6769691db0e6b29
iio: Fix iio_read_channel_processed_scale()

The code was checking if (ret) from the processed
channel readout, not smart, we need to check if (ret < 0)
as this will likely be something like IIO_VAL_INT.

Fixes: f17597780c90 ("iio: Provide iio_read_channel_processed_scale() API")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210323122705.1326362-1-linus.walleij@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/inkern.c