Skip to content

Commit

Permalink
[WATCHDOG] w83697ug, fix lock imbalance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Wim Van Sebroeck committed Jul 9, 2009
1 parent b86a6c6 commit db5d2d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/watchdog/w83697ug_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit db5d2d8

Please sign in to comment.