[PATCH 01/10] staging: r8188eu: no need for an else after return
From: Martin Kaiser
Date: Sat Apr 09 2022 - 12:32:36 EST
The else branch at the end of send_beacon is not necessary. We return in
the if branch.
Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 474391bf7cb5..babadfc279bc 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5767,13 +5767,11 @@ unsigned int send_beacon(struct adapter *padapter)
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
return _FAIL;
- if (!bxmitok) {
+ if (!bxmitok)
return _FAIL;
- } else {
- rtw_get_passing_time_ms(start);
- return _SUCCESS;
- }
+ rtw_get_passing_time_ms(start);
+ return _SUCCESS;
}
bool get_beacon_valid_bit(struct adapter *adapter)
--
2.30.2