[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>
This commit is contained in:
Jiri Slaby 2009-06-29 18:00:39 +02:00 committed by Wim Van Sebroeck
parent b86a6c6c7b
commit db5d2d8a5d

View 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 */