diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-06-08 08:54:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-12 23:45:16 +0200 |
commit | 17c88eb6a09bafb75644b8c37fd65c89c8f49bec (patch) | |
tree | c654f4655a5cc51ca5bd39b74fbe296be45cc9e9 /drivers/iio/frequency/ad9523.c | |
parent | staging: comedi: cleanup comedi_alloc_subdevices (diff) | |
download | linux-17c88eb6a09bafb75644b8c37fd65c89c8f49bec.tar.xz linux-17c88eb6a09bafb75644b8c37fd65c89c8f49bec.zip |
iio: frequency: ad9523: unlock on error in ad9523_reg_access()
There was a return path which got missed accidentally.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/frequency/ad9523.c')
-rw-r--r-- | drivers/iio/frequency/ad9523.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index 7272924484c1..832e6ab26114 100644 --- a/drivers/iio/frequency/ad9523.c +++ b/drivers/iio/frequency/ad9523.c @@ -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; |