diff options
author | Martin Kaiser <martin@kaiser.cx> | 2022-09-25 16:04:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-26 10:34:44 +0200 |
commit | 647085006beb2cc41bef27a24f249f4dec3c1e15 (patch) | |
tree | d1d0de91bb3af91323a613e0fe554d868a17dbc7 /drivers/staging | |
parent | 9d92bb1d89f5564653d7ee81d090c93f6e149da8 (diff) |
staging: r8188eu: don't check bSurpriseRemoved in SwLedOff
The SwLedOff function calls rtw_read8 which in turn calls usb_read.
bSurpriseRemoved is checked in usb_read. We don't have to check it again
in SwLedOff.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220925140406.112991-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_led.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index 989808a2b171..d3bd9a97efdc 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -51,7 +51,7 @@ static void SwLedOff(struct adapter *padapter, struct led_priv *pLed) u8 LedCfg; int res; - if (padapter->bSurpriseRemoved || padapter->bDriverStopped) + if (padapter->bDriverStopped) goto exit; res = rtw_read8(padapter, REG_LEDCFG2, &LedCfg);/* 0x4E */ |