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

From: Svyatoslav Ryhel

Date: Thu Apr 16 2026 - 07:20:21 EST


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