]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:07 +0000 (03:54 +0000)
commit eaf47b713b602e7d0129ed8d18d2818246a17e49 upstream.

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>
[bwh: Backported to 3.16:
 - Adjust context
 - Unlock pwrctrl_priv::lock]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index db785c05f01c2072f58366f606f5037bff1e7002..36899dd15188b6760cf1166dc1ee5514e19eda08 100644 (file)
@@ -511,8 +511,10 @@ int rtw_resume_process(struct adapter *padapter)
 
        ret = 0;
 exit:
-       if (pwrpriv)
+       if (pwrpriv) {
                pwrpriv->bInSuspend = false;
+               _exit_pwrlock(&pwrpriv->lock);
+       }
        DBG_88E("<===  %s return %d.............. in %dms\n", __func__,
                ret, rtw_get_passing_time_ms(start_time));