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

Commit 23bf4042 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

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



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>
parent 612e1c94
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -294,8 +294,10 @@ static int rtw_resume_process(struct adapter *padapter)
	pwrpriv->bkeepfwalive = false;

	pr_debug("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
	if (pm_netdev_open(pnetdev, true) != 0)
	if (pm_netdev_open(pnetdev, true) != 0) {
		mutex_unlock(&pwrpriv->mutex_lock);
		goto exit;
	}

	netif_device_attach(pnetdev);
	netif_carrier_on(pnetdev);
@@ -306,10 +308,8 @@ 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));