staging: r8188eu: convert else if to else in rtw_led.c
authorMichael Straube <straube.linux@gmail.com>
Fri, 8 Apr 2022 16:38:25 +0000 (18:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2022 13:48:48 +0000 (15:48 +0200)
The else if in this block is redundant, it can be a simple else.

if (x) {
  ...
} else if (!x) {
  ...
}

Convert two such else if statements to simple else in rw_led.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220408163825.29069-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c

index 4b047c4..2f30004 100644 (file)
@@ -110,7 +110,7 @@ static void blink_work(struct work_struct *work)
                                pLed->bLedLinkBlinkInProgress = true;
                                pLed->CurrLedState = LED_BLINK_NORMAL;
                                schedule_delayed_work(&pLed->blink_work, LED_BLINK_LINK_INTVL);
-                       } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
+                       } else {
                                pLed->bLedNoLinkBlinkInProgress = true;
                                pLed->CurrLedState = LED_BLINK_SLOWLY;
                                schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL);
@@ -131,7 +131,7 @@ static void blink_work(struct work_struct *work)
                                pLed->bLedLinkBlinkInProgress = true;
                                pLed->CurrLedState = LED_BLINK_NORMAL;
                                schedule_delayed_work(&pLed->blink_work, LED_BLINK_LINK_INTVL);
-                       } else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
+                       } else {
                                pLed->bLedNoLinkBlinkInProgress = true;
                                pLed->CurrLedState = LED_BLINK_SLOWLY;
                                schedule_delayed_work(&pLed->blink_work, LED_BLINK_NO_LINK_INTVL);