[PATCH] wifi: libertas: Propagate SDIO power-on errors from resume

Pengpeng Hou pengpeng at iscas.ac.cn
Fri Aug 28 02:16:27 PDT 2026


if_sdio_power_on() can fail while enabling the SDIO function or
programming firmware and already unwinds the SDIO function on those
paths.  Resume ignores the result and can wait for firmware readiness
and call lbs_resume() after power-on failed.

Return the power-on error before waiting for firmware or resuming the
core.

The issue was identified via static analysis and manually reviewed.

Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")

Assisted-by: LLM
Signed-off-by: Pengpeng Hou <pengpeng at iscas.ac.cn>
---
 drivers/net/wireless/marvell/libertas/if_sdio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
index dd6756c1242e..5406c8fcdba0 100644
--- a/drivers/net/wireless/marvell/libertas/if_sdio.c
+++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
@@ -1359,7 +1359,9 @@ static int if_sdio_resume(struct device *dev)
 	dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
 
 	if (card->priv->power_up_on_resume) {
-		if_sdio_power_on(card);
+		ret = if_sdio_power_on(card);
+		if (ret)
+			return ret;
 		wait_event(card->pwron_waitq, card->priv->fw_ready);
 	}
 
-- 
2.43.0




More information about the libertas-dev mailing list