iio: humidity: Remove a stray unlock
Subsystems (2)
PATCH 1/1 iio: humidity: Remove a stray unlock
We haven't taken the lock yet so we don't need to unlock here.
drivers/iio/humidity/am2315.c +1 -3
@@ -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 ) {
Quoted 32 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Tuesday, May 17, 2016 10:32 AM
To: Jonathan Cameron <[email protected]>; Breana, Tiberiu A <[email protected]>
Cc: Hartmut Knaack <[email protected]>; Lars-Peter Clausen <[email protected]>; Peter Meerwald-Stadler <[email protected]>; [email protected]; [email protected]
Subject: [patch] iio: humidity: Remove a stray unlockWe haven't taken the lock yet so we don't need to unlock here.
Fixes 0d96d5ead3f7 ('iio: humidity: Add triggered buffer support forAM2315')
Signed-off-by Dan Carpenter <[email protected]>drivers/iio/humidity/am2315.c +1
-3@@ -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);
Quoted 2 lines
if (*(indio_dev->active_scan_mask) =
AM2315_ALL_CHANNEL_MASK) {
That one must have slipped by during development versions. You might also want to add am2315 in the patch title. Thanks,
Quoted 2 lines · Tiberiu A
That one must have slipped by during development versions. You might also want to add am2315 in the patch title.
Yeah. I'll resend.
I obviously just mindlessly cut and pasted that from the earlier patch:
That patch also has the wrong subject line because it was just copied from the first patch 366a3270c1c5 ('iio: humidity: Add support for AM2315').
And just a few minutes ago I was giving another new driver its own prefix. But even though I thought--more than I should have--about what the author wanted to use as a prefix for his driver, I still probably read his mind incorrectly.
In other words, we need to start with the correct prefix from square
one: iio: humidity: am2315: Add support for AM2315
regards,
dan carpenter
PATCH v2 1/1 iio: humidity: am2315: Remove a stray unlock
In reply to Breana, Tiberiu AWe haven't taken the lock yet so we don't need to unlock here.
---
v2: update subject
drivers/iio/humidity/am2315.c +1 -3
@@ -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 ) {
Re: [patch v2] iio: humidity: am2315: Remove a stray unlock
Quoted 5 lines · Dan Carpenter
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 <[email protected]>Acked-by Tiberiu Breana <[email protected]>
Applied to the fixes-togreg-post-rc1 branch of iio.git
Thanks,
Jonathan
Quoted 20 lines
---
v2: update subjectdrivers/iio/humidity/am2315.c +1
-3@@ -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 ) {