Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jiri Slaby and committed by
Wim Van Sebroeck
db5d2d8a b86a6c6c

+3 -1
+3 -1
drivers/watchdog/w83697ug_wdt.c
··· 149 149 { 150 150 spin_lock(&io_lock); 151 151 152 - if (w83697ug_select_wd_register() < 0) 152 + if (w83697ug_select_wd_register() < 0) { 153 + spin_unlock(&io_lock); 153 154 return; 155 + } 154 156 155 157 outb_p(0xF4, WDT_EFER); /* Select CRF4 */ 156 158 outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */