staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 26 Aug 2016 14:45:05 +0000 (14:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:55:43 +0000 (17:55 +0200)
Add the missing unlock before return from function
rtw_resume_process() in the error handling case.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index a5ba1e4da15e5e36f9a608d13c367fa5b527e167..7da3534f15f78c71894f706f7d50ab0f05c805c1 100644 (file)
@@ -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));