mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] RTC: ds1374, fix lock imbalance
@ 2009-06-19 15:53 Jiri Slaby
  0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-06-19 15:53 UTC (permalink / raw)
  To: a.zummo; +Cc: rtc-linux, linux-kernel, Jiri Slaby

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>
---
 drivers/rtc/rtc-ds1374.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 32b2773..713f7bf 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);
 }
 
-- 
1.6.3.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-19 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-19 15:53 [PATCH 1/1] RTC: ds1374, fix lock imbalance Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®