* [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access()
@ 2012-06-08 6:54 Dan Carpenter
2012-06-08 7:23 ` Michael Hennerich
0 siblings, 1 reply; 2+ 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] 2+ messages in thread
* Re: [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access()
2012-06-08 6:54 [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access() Dan Carpenter
@ 2012-06-08 7:23 ` Michael Hennerich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Hennerich @ 2012-06-08 7:23 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jonathan Cameron, Greg Kroah-Hartman, linux-iio@vger.kernel.org,
kernel-janitors@vger.kernel.org
On 06/08/2012 08:54 AM, Dan Carpenter wrote:
> 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>
>
> 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;
>
--
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-08 7:23 UTC | newest]
Thread overview: 2+ 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 7:23 ` Michael Hennerich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).