提交 0c88d23c 编写于 作者: D Dan Carpenter 提交者: Jonathan Cameron

iio:dac:ad5449: unlock on error path

There is an unlock missing on this error path.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 6b3aa313
......@@ -124,12 +124,13 @@ static int ad5449_read(struct iio_dev *indio_dev, unsigned int addr,
ret = spi_sync(st->spi, &msg);
if (ret < 0)
return ret;
goto out_unlock;
*val = be16_to_cpu(st->data[1]);
mutex_unlock(&indio_dev->mlock);
return 0;
out_unlock:
mutex_unlock(&indio_dev->mlock);
return ret;
}
static int ad5449_read_raw(struct iio_dev *indio_dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册