summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-17 10:02:56 +0200
committerJonathan Cameron <jic23@kernel.org>2016-05-21 18:47:14 +0200
commit1cb0d06a00f2ec0ed8f926ec62f53bc9e12ea55e (patch)
treee855da9cec69f15bf5571cad7aefebf523613292 /drivers/iio/humidity
parentiio: humidity: hdc100x: correct humidity integration time mask (diff)
downloadlinux-1cb0d06a00f2ec0ed8f926ec62f53bc9e12ea55e.tar.xz
linux-1cb0d06a00f2ec0ed8f926ec62f53bc9e12ea55e.zip
iio: humidity: am2315: Remove a stray unlock
We haven't taken the lock yet so we don't need to unlock here. Fixes: 0d96d5ead3f7 ('iio: humidity: Add triggered buffer support for AM2315') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/humidity')
-rw-r--r--drivers/iio/humidity/am2315.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index 3be6d209a159..11535911a5c6 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -165,10 +165,8 @@ static irqreturn_t am2315_trigger_handler(int irq, void *p)
struct am2315_sensor_data sensor_data;
ret = am2315_read_data(data, &sensor_data);
- if (ret < 0) {
- mutex_unlock(&data->lock);
+ if (ret < 0)
goto err;
- }
mutex_lock(&data->lock);
if (*(indio_dev->active_scan_mask) == AM2315_ALL_CHANNEL_MASK) {