Commit 273f111f authored by Wei Yongjun's avatar Wei Yongjun Committed by Ben Hutchings

staging: rtl8188eu: fix double unlock error in rtw_resume_process()

commit 23bf4042 upstream.

Fix following static checker warning:
    drivers/staging/rtl8188eu/os_dep/usb_intf.c:311 rtw_resume_process()
    error: double unlock 'mutex:&pwrpriv->mutex_lock'

Fixes: eaf47b71 ("staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()")
Reported-By: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16:
 - Adjust context
 - Unlock pwrctrl_priv::lock]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 0a43549f
......@@ -494,8 +494,10 @@ int rtw_resume_process(struct adapter *padapter)
pwrpriv->bkeepfwalive = false;
DBG_88E("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
if (pm_netdev_open(pnetdev, true) != 0)
if (pm_netdev_open(pnetdev, true) != 0) {
_exit_pwrlock(&pwrpriv->lock);
goto exit;
}
netif_device_attach(pnetdev);
netif_carrier_on(pnetdev);
......@@ -511,10 +513,8 @@ 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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment