summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1374.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-07-05 12:08:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-06 13:57:03 -0700
commit28df30e61b46a33d1f0bb60757747396886ef687 (patch)
tree9ef6f24145e28a38884da1ba1e2e895c3f17bbb1 /drivers/rtc/rtc-ds1374.c
parentefc0cfa6d16103bd72a7c398f1321816b635370f (diff)
rtc: ds1374, fix lock imbalance
When i2c_smbus_read_byte_data fails in ds1374_work, we forgot to unlock the held lock. Fix that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1374.c')
-rw-r--r--drivers/rtc/rtc-ds1374.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 32b27739ec2a..713f7bf5afb3 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -283,7 +283,7 @@ static void ds1374_work(struct work_struct *work)
stat = i2c_smbus_read_byte_data(client, DS1374_REG_SR);
if (stat < 0)
- return;
+ goto unlock;
if (stat & DS1374_REG_SR_AF) {
stat &= ~DS1374_REG_SR_AF;
@@ -302,7 +302,7 @@ static void ds1374_work(struct work_struct *work)
out:
if (!ds1374->exiting)
enable_irq(client->irq);
-
+unlock:
mutex_unlock(&ds1374->mutex);
}