Re: [patch -next] iio: frequency: ad9523: unlock on error in ad9523_reg_access()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Acked-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>

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


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux