Commit 8f6817a0 authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron

iio staging: fix lis3l02dq, read error handling

Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bb377961
...@@ -257,6 +257,8 @@ static int lis3l02dq_read_raw(struct iio_dev *indio_dev, ...@@ -257,6 +257,8 @@ static int lis3l02dq_read_raw(struct iio_dev *indio_dev,
ret = lis3l02dq_read_reg_s16(indio_dev, reg, val); ret = lis3l02dq_read_reg_s16(indio_dev, reg, val);
} }
mutex_unlock(&indio_dev->mlock); mutex_unlock(&indio_dev->mlock);
if (ret < 0)
goto error_ret;
return IIO_VAL_INT; return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE: case IIO_CHAN_INFO_SCALE:
*val = 0; *val = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment