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>
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;
}