staging: r8188eu: summarize two if statements
authorMartin Kaiser <martin@kaiser.cx>
Sat, 9 Apr 2022 16:32:05 +0000 (18:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2022 13:49:58 +0000 (15:49 +0200)
Summarize the two if statements at the end of send_beacon.

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

index 9fc4f18..66dd063 100644 (file)
@@ -5763,9 +5763,7 @@ unsigned int send_beacon(struct adapter *padapter)
                } while ((poll % 10) != 0 && !bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
        } while (!bxmitok && issue < 100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
 
-       if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
-               return _FAIL;
-       if (!bxmitok)
+       if (padapter->bSurpriseRemoved || padapter->bDriverStopped || !bxmitok)
                return _FAIL;
 
        return _SUCCESS;