All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access()
@ 2012-06-08  6:54 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-06-08  6:54 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Greg Kroah-Hartman, Michael Hennerich, linux-iio, kernel-janitors

There was a return path which got missed accidentally.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-08  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08  6:54 [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access() Dan Carpenter
2012-06-08  6:54 ` Dan Carpenter
2012-06-08  7:23 ` Michael Hennerich
2012-06-08  7:23   ` Michael Hennerich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.