summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-06-29 18:00:39 +0200
committerWim Van Sebroeck <wim@iguana.be>2009-07-09 18:29:16 +0000
commitdb5d2d8a5dfe0ae3e83ac618fd953ecc621adcdf (patch)
tree2124d7b3ac8dbb72dc0784e7f40b5d08bec60f9e /drivers/watchdog
parentb86a6c6c7b0bfc26b3e8d4f48e16ee0b13716385 (diff)
downloadblackbird-op-linux-db5d2d8a5dfe0ae3e83ac618fd953ecc621adcdf.tar.gz
blackbird-op-linux-db5d2d8a5dfe0ae3e83ac618fd953ecc621adcdf.zip
[WATCHDOG] w83697ug, fix lock imbalance
Don't forget to unlock io_lock when w83697ug_select_wd_register fails in wdt_ctrl. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/w83697ug_wdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/watchdog/w83697ug_wdt.c b/drivers/watchdog/w83697ug_wdt.c
index 883b5f79673a..a6c12dec91a1 100644
--- a/drivers/watchdog/w83697ug_wdt.c
+++ b/drivers/watchdog/w83697ug_wdt.c
@@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout)
{
spin_lock(&io_lock);
- if (w83697ug_select_wd_register() < 0)
+ if (w83697ug_select_wd_register() < 0) {
+ spin_unlock(&io_lock);
return;
+ }
outb_p(0xF4, WDT_EFER); /* Select CRF4 */
outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */
OpenPOWER on IntegriCloud