watchdog: w83697ug, fix lock imbalance
PATCH 1/5 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 <[email protected]>
--- drivers/watchdog/w83697ug_wdt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/watchdog/w83697ug_wdt.c +3 -1
@@ -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 */
Signature · 1 line
1.6.3.2
Hi Jiri,
Will add this to the linux-2.6-watchdog trees.
Kind regards,
Wim.
Quoted 27 lines
Don't forget to unlock
io_lockwhenw83697ug_select_wd_registerfails inwdt_ctrl.Signed-off-by Jiri Slaby <[email protected]>--- drivers/watchdog/w83697ug_wdt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/watchdog/w83697ug_wdt.c +3
-1@@ -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 */ Signature · 1 line
1.6.3.2