Skip to content

Commit 8f6817a

Browse files
pmeerwjic23
authored andcommitted
iio staging: fix lis3l02dq, read error handling
Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent bb37796 commit 8f6817a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/staging/iio/accel/lis3l02dq_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ static int lis3l02dq_read_raw(struct iio_dev *indio_dev,
257257
ret = lis3l02dq_read_reg_s16(indio_dev, reg, val);
258258
}
259259
mutex_unlock(&indio_dev->mlock);
260+
if (ret < 0)
261+
goto error_ret;
260262
return IIO_VAL_INT;
261263
case IIO_CHAN_INFO_SCALE:
262264
*val = 0;

0 commit comments

Comments
 (0)