From: Jiri Slaby Date: Mon, 29 Jun 2009 16:00:39 +0000 (+0200) Subject: [WATCHDOG] w83697ug, fix lock imbalance X-Git-Tag: v2.6.31-rc3~36^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db5d2d8a5dfe0ae3e83ac618fd953ecc621adcdf;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [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 Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/w83697ug_wdt.c b/drivers/watchdog/w83697ug_wdt.c index 883b5f7..a6c12de 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 */