summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-11-06 13:48:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-08 16:29:29 +0100
commitd44fa4cb2e30fc22b2763fd425f2c48be958354f (patch)
treeb0a7ee3520b8e980992e97d71c7c2e48afeaa312 /drivers
parent2dbc324eaab66098ae485114b0862653355a0a2b (diff)
downloadlinux-d44fa4cb2e30fc22b2763fd425f2c48be958354f.tar.bz2
staging: r8188eu: remove state checks in rtw_led_control
There's no need to check for bSurpriseRemoved or bDriverStopped in the rtw_led_control function. This function schedules a delayed worker which calls SwLedOn or SwLedOff (or the function calls SwLedOff directly). SwLedOn and SwLedOff check bDriverStopped themselves or they initiate a USB control transfer via usb_write, where bSurpriseRemoved is checked. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221106124901.720785-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/r8188eu/core/rtw_led.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index ce8de2eb7845..48725ce9d369 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -140,8 +140,7 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
struct registry_priv *registry_par;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) ||
- (!padapter->hw_init_completed))
+ if (!padapter->hw_init_completed)
return;
if (!pLed->bRegUseLed)