[WATCHDOG] w83697ug, fix lock imbalance
authorJiri Slaby <jirislaby@gmail.com>
Mon, 29 Jun 2009 16:00:39 +0000 (18:00 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 9 Jul 2009 18:29:16 +0000 (18:29 +0000)
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>
drivers/watchdog/w83697ug_wdt.c

index 883b5f79673a65026f9f129bbe22b79b31bdd652..a6c12dec91a1434c57709b8570f3a3666ae04bc7 100644 (file)
@@ -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 */