Commit 1cb0d06a authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio: humidity: am2315: Remove a stray unlock

We haven't taken the lock yet so we don't need to unlock here.

Fixes: 0d96d5ea ('iio: humidity: Add triggered buffer support for AM2315')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarTiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 0e35cf5c
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment