Cancel blink_work if WPS fails. Another worker will be scheduled after the state variables are updated. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index 4841bb2898ba..80d9d8184fcd 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -357,8 +357,8 @@ 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) { - cancel_delayed_work(&pLed->blink_work); pLed->bLedWPSBlinkInProgress = false; } pLed->bLedNoLinkBlinkInProgress = true; -- 2.30.2