Skip to content

Commit 78f0dfa

Browse files
jhovoldjic23
authored andcommitted
iio: inkern: fix channel read regression
A recent "cleanup" broke IIO channel read outs and thereby thermal mitigation on the Lenovo ThinkPad X13s by returning zero instead of the expected IIO value type in iio_read_channel_processed_scale(): thermal thermal_zone12: failed to read out thermal zone (-22) Fixes: 3092bde ("iio: inkern: move to the cleanup.h magic") Cc: Nuno Sa <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 8844ed0 commit 78f0dfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/inkern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ int iio_read_channel_processed_scale(struct iio_channel *chan, int *val,
721721
return ret;
722722
*val *= scale;
723723

724-
return 0;
724+
return ret;
725725
} else {
726726
ret = iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_RAW);
727727
if (ret < 0)

0 commit comments

Comments
 (0)