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

Svyatoslav Ryhel
2026-04-16T11:15:00Z

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