[PATCH v1 0/1] iio: Fix iio_multiply_value use in iio_read_channel_processed_scale

Svyatoslav Ryhel posted 1 patch 2 months ago
drivers/iio/inkern.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[PATCH v1 0/1] iio: Fix iio_multiply_value use in iio_read_channel_processed_scale
Posted by Svyatoslav Ryhel 2 months ago
The function iio_multiply_value returns IIO_VAL_INT (1) on success or a
negative error number on failure, while iio_read_channel_processed_scale
should return an error code or 0. This creates a situation where the
expected result is treated as an error. Fix this by checking the
iio_multiply_value result separately, instead of passing it as a return
value.

Svyatoslav Ryhel (1):
  iio: Fix iio_multiply_value use in iio_read_channel_processed_scale

 drivers/iio/inkern.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.51.0