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

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

 



There was a return path which got missed accidentally.

Signed-off-by: Dan Carpenter <dan.carpenter@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;
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux