提交 c773f700 编写于 作者: P Peter Rosin 提交者: Jonathan Cameron

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: 00c5f80c ("iio: inkern: add helpers to query available values from channels")
Signed-off-by: NPeter Rosin <peda@axentia.se>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 9a043b0b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册