mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 23:33:01 -04:00
staging: r8188eu: handle rtw_write8 errors in SwLedOn
Check the status returned by rtw_write8. 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-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
12c6223fc1
commit
e5931b7ba5
@@ -34,7 +34,9 @@ static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
|
||||
if (padapter->bDriverStopped)
|
||||
return;
|
||||
|
||||
rtw_write8(padapter, REG_LEDCFG2, BIT(5)); /* SW control led0 on. */
|
||||
if (rtw_write8(padapter, REG_LEDCFG2, BIT(5)) != _SUCCESS)
|
||||
return;
|
||||
|
||||
pLed->bLedOn = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user