iio staging: fix lis3l02dq, read error handling

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Peter Meerwald 2013-07-07 21:24:00 +01:00 committed by Jonathan Cameron
parent bb37796102
commit 8f6817a0a5

View File

@ -257,6 +257,8 @@ static int lis3l02dq_read_raw(struct iio_dev *indio_dev,
ret = lis3l02dq_read_reg_s16(indio_dev, reg, val);
}
mutex_unlock(&indio_dev->mlock);
if (ret < 0)
goto error_ret;
return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE:
*val = 0;