staging: r8188eu: reset blink state when WPS fails
authorMartin Kaiser <martin@kaiser.cx>
Mon, 5 Sep 2022 20:01:45 +0000 (22:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Sep 2022 07:52:08 +0000 (09:52 +0200)
When WPS fails, WPS blinking is no longer in progress. The if statement
can be removed.

Tested-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220905200146.82259-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c

index 80d9d8184fcd0b88a509ff12ea97f25dfb683b5a..f5af2e25e34a946c5adc619f63e13e3c47a13409 100644 (file)
@@ -358,9 +358,7 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
                break;
        case LED_CTL_STOP_WPS_FAIL:
                cancel_delayed_work(&pLed->blink_work);
-               if (pLed->bLedWPSBlinkInProgress) {
-                       pLed->bLedWPSBlinkInProgress = false;
-               }
+               pLed->bLedWPSBlinkInProgress = false;
                pLed->bLedNoLinkBlinkInProgress = true;
                pLed->CurrLedState = LED_BLINK_SLOWLY;
                if (pLed->bLedOn)