[PATCH 2/5] drivers: staging: rtl8723au: core: simplify if-break-else
From: Matthias Beyer
Date: Sun Sep 04 2016 - 15:28:25 EST
As the if statement breaks/continues the loop, the else block is not
useful and can be omitted.
Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
Signed-off-by: Manuel Messner <manuel.johannes.messner@xxxxxxxxxxxxxxxx>
---
drivers/staging/rtl8723au/core/rtw_mlme.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 8b8b6a9..da9f298 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -244,21 +244,18 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
do_join_r = rtw_do_join(padapter);
if (do_join_r == _SUCCESS)
break;
- else {
- DBG_8723A("roaming do_join return %d\n",
- do_join_r);
- pmlmepriv->to_roaming--;
- if (padapter->mlmepriv.to_roaming > 0)
- continue;
- else {
- DBG_8723A("%s(%d) -to roaming fail, "
- "indicate_disconnect\n",
- __func__, __LINE__);
- rtw_indicate_disconnect23a(padapter);
- break;
- }
- }
+ DBG_8723A("roaming do_join return %d\n", do_join_r);
+ pmlmepriv->to_roaming--;
+
+ if (padapter->mlmepriv.to_roaming > 0)
+ continue;
+
+ DBG_8723A("%s(%d) -to roaming fail, "
+ "indicate_disconnect\n",
+ __func__, __LINE__);
+ rtw_indicate_disconnect23a(padapter);
+ break;
}
}
}
--
2.9.3