Skip to contentSkip to conversation

staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()

PATCH New Wei Yongjun 1 participant 1 message Aug 26, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()

From: Wei Yongjun <[email protected]>

Add the missing unlock before return from function rtw_resume_process() in the error handling case.

---
 drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +3 -1
index a5ba1e4..7da3534 100644
@@ -315,8 +315,10 @@ static int rtw_resume_process(struct adapter *padapter)
 
 	ret = 0;
 exit:
-	if (pwrpriv)
+	if (pwrpriv) {
 		pwrpriv->bInSuspend = false;
+		mutex_unlock(&pwrpriv->mutex_lock);
+	}
 	pr_debug("<===  %s return %d.............. in %dms\n", __func__,
 		ret, jiffies_to_msecs(jiffies - start_time));