staging: rtl8723bs: os_dep: Remove conditions with no effects
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Wed, 9 Jun 2021 13:23:46 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jun 2021 13:37:46 +0000 (15:37 +0200)
Removed conditions with no effects. Detected by Coccinelle.
Deleted a variable that is no longer used because of the above-mentioned
removals.

Reviewed-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210609132346.15403-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/os_intfs.c

index 213ec5b4ce98b13d82cfc68e2084bc5e8faf6895..11b9a5919da40f04139e66b81983f065f6d980eb 100644 (file)
@@ -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);