Skip to contentSkip to conversation

staging: rtl8723bs: os_dep: Remove conditions with no effects

PATCH New Fabio M. De Francesco 1 participant 1 message Jun 9, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: os_dep: Remove conditions with no effects

Removed conditions with no effects. Detected by Coccinelle. Deleted a variable that is no longer used because of the above-mentioned removals.

---

v1->v2: As reported by Greg Kroah-Hartman <[email protected]>, deleted a variable that became unused because of the removal of the conditions.

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/staging/rtl8723bs/os_dep/os_intfs.c +2 -10
index 213ec5b4ce98..11b9a5919da4 100644
@@ -1187,10 +1187,7 @@ void rtw_suspend_common(struct adapter *padapter)
 
 	rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND);
 
-	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
-		rtw_suspend_normal(padapter);
-	else
-		rtw_suspend_normal(padapter);
+	rtw_suspend_normal(padapter);
 
 	netdev_dbg(padapter->pnetdev, "rtw suspend success in %d ms\n",
 		   jiffies_to_msecs(jiffies - start_time));
@@ -1264,15 +1261,10 @@ int rtw_resume_common(struct adapter *padapter)
 	int ret = 0;
 	unsigned long start_time = jiffies;
 	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
 	netdev_dbg(padapter->pnetdev, "resume start\n");
 
-	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
-		rtw_resume_process_normal(padapter);
-	} else {
-		rtw_resume_process_normal(padapter);
-	}
+	rtw_resume_process_normal(padapter);
 
 	hal_btcoex_SuspendNotify(padapter, 0);
 
Signature · 1 line
2.31.1