iio: humidity: am2315: Remove a stray unlock
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 May 2016 08:02:56 +0000 (11:02 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 May 2016 16:47:14 +0000 (17:47 +0100)
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>
drivers/iio/humidity/am2315.c

index 3be6d209a1595961ddd19dbcf8fc240f07617a77..11535911a5c697fa359aec0a4626f7a80b3d1e12 100644 (file)
@@ -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) {