Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db5d2d8a authored by Jiri Slaby's avatar Jiri Slaby Committed by Wim Van Sebroeck
Browse files

[WATCHDOG] w83697ug, fix lock imbalance



Don't forget to unlock io_lock when w83697ug_select_wd_register fails in
wdt_ctrl.

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent b86a6c6c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */