Commit 54eb23f
iio: accel: adxl380: fix raw sample read
The adxl380_read_chn function returns either a negative value in case an
error occurs or the actual sample.
Check only for negative values after a channel is read.
Link: https://lore.kernel.org/lkml/20241101095202.20121-1-antoniu.miclaus@analog.com/
Fixes: 90a7580 ("iio: accel: add ADXL380 driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>1 parent 7c9195b commit 54eb23f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | | - | |
| 1184 | + | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| |||
0 commit comments