diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c index 975e23fc513f36..dbdc03967ee799 100644 --- a/drivers/iio/accel/adxl380.c +++ b/drivers/iio/accel/adxl380.c @@ -1181,7 +1181,7 @@ static int adxl380_read_raw(struct iio_dev *indio_dev, return ret; ret = adxl380_read_chn(st, chan->address); - if (ret) + if (ret < 0) return ret; iio_device_release_direct_mode(indio_dev);