[PATCH 6/9] staging: r8188eu: remove unnecessary if statement

Michael Straube
2022-03-28T11:49:57Z

The local variable threshold in rtw_joinbss_reset() is set to 0 and
immediately set to another value if it is 0. Remove this unnecessary
if and assign the final value in the first place.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 14aff6a2040a..83841cf85a0d 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -1816,10 +1816,8 @@ void rtw_joinbss_reset(struct adapter *padapter)
if (padapter->registrypriv.wifi_spec == 1)
threshold = 1;
else
- threshold = 0;
-
- if (threshold == 0)
threshold = USB_RXAGG_PAGE_COUNT;
+
rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, threshold);
} else {
threshold = 1;
--
2.35.1