提交 db5d2d8a 编写于 作者: J Jiri Slaby 提交者: Wim Van Sebroeck

[WATCHDOG] w83697ug, fix lock imbalance

Don't forget to unlock io_lock when w83697ug_select_wd_register fails in
wdt_ctrl.
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 b86a6c6c
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册