staging: r8188eu: simplify the ps_processing check
authorMartin Kaiser <martin@kaiser.cx>
Wed, 13 Apr 2022 19:36:49 +0000 (21:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Apr 2022 07:06:59 +0000 (09:06 +0200)
It's sufficient to check pwrpriv->ps_processing as part of the while-loop.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220413193654.258507-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_pwrctrl.c

index 6a40f4a..fd7ea83 100644 (file)
@@ -382,10 +382,8 @@ int rtw_pwr_wakeup(struct adapter *padapter)
        if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms))
                pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
 
-       if (pwrpriv->ps_processing) {
-               while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
-                       msleep(10);
-       }
+       while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
+               msleep(10);
 
        /* System suspend is not allowed to wakeup */
        while (pwrpriv->bInSuspend && rtw_get_passing_time_ms(start) <= 3000)