[PATCH v2 1/2] staging: rtl8188eu: remove empty if statement in rtw_led.c

Michael Straube straube.linux at gmail.com
Wed Sep 5 18:44:07 UTC 2018


Remove emtpy if statement from 'if - else if' by moving
all conditions into a single if. Also clears a line over
80 characters checkpatch warning.

Signed-off-by: Michael Straube <straube.linux at gmail.com>
---
v2: changed patch 1/2 that was wrong.

 drivers/staging/rtl8188eu/core/rtw_led.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c
index cbef871a7679..a4d10fc5d3bb 100644
--- a/drivers/staging/rtl8188eu/core/rtw_led.c
+++ b/drivers/staging/rtl8188eu/core/rtw_led.c
@@ -290,9 +290,9 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
 		}
 		break;
 	case LED_CTL_SITE_SURVEY:
-		if ((pmlmepriv->LinkDetectInfo.bBusyTraffic) && (check_fwstate(pmlmepriv, _FW_LINKED))) {
-			;
-		} else if (!pLed->bLedScanBlinkInProgress) {
+		if ((!pmlmepriv->LinkDetectInfo.bBusyTraffic ||
+		     !check_fwstate(pmlmepriv, _FW_LINKED)) &&
+		    !pLed->bLedScanBlinkInProgress) {
 			if (IS_LED_WPS_BLINKING(pLed))
 				return;
 			if (pLed->bLedNoLinkBlinkInProgress) {
-- 
2.18.0



More information about the devel mailing list