summaryrefslogtreecommitdiffstats
path: root/drivers/iio/inkern.c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2017-04-20 23:01:57 +0200
committerJonathan Cameron <jic23@kernel.org>2017-04-26 06:04:06 +0100
commitc773f70015f6f07f4abe93b486da7f53fde6e878 (patch)
treed13f2f882b73cc7af43938511dbc58c2bac234ab /drivers/iio/inkern.c
parent9a043b0bf286e189ab49410c66170c86d59563c5 (diff)
downloadblackbird-obmc-linux-c773f70015f6f07f4abe93b486da7f53fde6e878.tar.gz
blackbird-obmc-linux-c773f70015f6f07f4abe93b486da7f53fde6e878.zip
iio: inkern: fix a static checker error
Avoid this smatch error: drivers/iio/inkern.c:751 iio_read_avail_channel_raw() error: double unlock 'mutex:&chan->indio_dev->info_exist_lock' Fixes: 00c5f80c2fad ("iio: inkern: add helpers to query available values from channels") Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/inkern.c')
-rw-r--r--drivers/iio/inkern.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 7a13535dc3e9..a3941bade6a7 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -750,11 +750,9 @@ int iio_read_avail_channel_raw(struct iio_channel *chan,
err_unlock:
mutex_unlock(&chan->indio_dev->info_exist_lock);
- if (ret >= 0 && type != IIO_VAL_INT) {
+ if (ret >= 0 && type != IIO_VAL_INT)
/* raw values are assumed to be IIO_VAL_INT */
ret = -EINVAL;
- goto err_unlock;
- }
return ret;
}
OpenPOWER on IntegriCloud