diff options
author | Antoniu Miclaus <antoniu.miclaus@analog.com> | 2024-11-01 12:52:01 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-11-01 18:24:01 +0300 |
commit | bfa335f18d91c52fa0f8ba3e4d49afebbd9ee792 (patch) | |
tree | 0a6a0b52ac7e72fb87ec1f8d887a92a029e6dd9c /drivers/fpga/fpga-bridge.c | |
parent | b7d2bc99b3bdc03fff9b416dd830632346d83530 (diff) | |
download | linux-bfa335f18d91c52fa0f8ba3e4d49afebbd9ee792.tar.xz |
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.
Fixes: df36de13677a ("iio: accel: add ADXL380 driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://patch.msgid.link/20241101095202.20121-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions