public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] iio: Fix iio_multiply_value use in iio_read_channel_processed_scale
@ 2026-04-16 11:14 Svyatoslav Ryhel
  2026-04-16 11:14 ` [PATCH v1 1/1] " Svyatoslav Ryhel
  0 siblings, 1 reply; 4+ messages in thread
From: Svyatoslav Ryhel @ 2026-04-16 11:14 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Hans de Goede, Svyatoslav Ryhel
  Cc: linux-iio, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-19 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 11:14 [PATCH v1 0/1] iio: Fix iio_multiply_value use in iio_read_channel_processed_scale Svyatoslav Ryhel
2026-04-16 11:14 ` [PATCH v1 1/1] " Svyatoslav Ryhel
2026-04-16 12:31   ` Hans de Goede
2026-04-19 17:04     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox