Skip to content

Commit

Permalink
iio staging: fix lis3l02dq, read error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Peter Meerwald authored and Jonathan Cameron committed Jul 9, 2013
1 parent bb37796 commit 8f6817a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/iio/accel/lis3l02dq_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f6817a

Please sign in to comment.