From: Dan Carpenter Date: Fri, 8 Jun 2012 06:54:03 +0000 (+0300) Subject: iio: frequency: ad9523: unlock on error in ad9523_reg_access() X-Git-Tag: v3.12-rc1~2682^2~818 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17c88eb6a09bafb75644b8c37fd65c89c8f49bec;p=kernel%2Fkernel-generic.git iio: frequency: ad9523: unlock on error in ad9523_reg_access() There was a return path which got missed accidentally. Signed-off-by: Dan Carpenter Acked-by: Michael Hennerich Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c index 7272924..832e6ab 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;