staging: r8188eu: remove duplicate bSurpriseRemoved check
authorMartin Kaiser <martin@kaiser.cx>
Sun, 18 Sep 2022 17:56:59 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2022 11:09:18 +0000 (13:09 +0200)
We don't have to check bSurpriseRemoved in the SwLedOn function.

SwLedOn calls rtw_read8 which in turn calls usb_read. This function checks
bSurpriseRemoved for us.

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/20220918175700.215170-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c

index 744247af5956e2e3516d31ae791c753e436999a9..989808a2b171e34957e8bbad44a0b0bad928fc8f 100644 (file)
@@ -35,7 +35,7 @@ static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
        u8      LedCfg;
        int res;
 
-       if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
+       if (padapter->bDriverStopped)
                return;
 
        res = rtw_read8(padapter, REG_LEDCFG2, &LedCfg);