mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
staging: r8188eu: fix status updates in SwLedOff
Update bLedOn only if we could update the REG_LEDCFG2 register. 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/20221015151115.232095-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e5931b7ba5
commit
ef032c4fa4
@@ -43,10 +43,11 @@ static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
|
||||
static void SwLedOff(struct adapter *padapter, struct led_priv *pLed)
|
||||
{
|
||||
if (padapter->bDriverStopped)
|
||||
goto exit;
|
||||
return;
|
||||
|
||||
if (rtw_write8(padapter, REG_LEDCFG2, BIT(5) | BIT(3)) != _SUCCESS)
|
||||
return;
|
||||
|
||||
rtw_write8(padapter, REG_LEDCFG2, BIT(5) | BIT(3));
|
||||
exit:
|
||||
pLed->bLedOn = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user