提交 17c88eb6 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

iio: frequency: ad9523: unlock on error in ad9523_reg_access()

There was a return path which got missed accidentally.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 03afcf47
......@@ -731,10 +731,12 @@ static int ad9523_reg_access(struct iio_dev *indio_dev,
} else {
ret = ad9523_read(indio_dev, reg | AD9523_R1B);
if (ret < 0)
return ret;
goto out_unlock;
*readval = ret;
ret = 0;
}
out_unlock:
mutex_unlock(&indio_dev->mlock);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册