Commit db5d2d8a authored by Jiri Slaby's avatar Jiri Slaby Committed by Wim Van Sebroeck

[WATCHDOG] w83697ug, fix lock imbalance

Don't forget to unlock io_lock when w83697ug_select_wd_register fails in
wdt_ctrl.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent b86a6c6c
...@@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout) ...@@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout)
{ {
spin_lock(&io_lock); spin_lock(&io_lock);
if (w83697ug_select_wd_register() < 0) if (w83697ug_select_wd_register() < 0) {
spin_unlock(&io_lock);
return; return;
}
outb_p(0xF4, WDT_EFER); /* Select CRF4 */ outb_p(0xF4, WDT_EFER); /* Select CRF4 */
outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */ outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment