From f86bc8a7421defdff701addfb66b286c13abf024 Mon Sep 17 00:00:00 2001 From: Karl Mehltretter Date: Sat, 3 Oct 2026 21:22:56 +0200 Subject: wifi: nxpwifi: return timeout error from nxpwifi_sdio_poll_card_status() nxpwifi_sdio_poll_card_status() returns the result of the last register read when polling times out. If the final register read succeeds, the timeout is incorrectly reported as success. Return -ETIMEDOUT when polling runs out of retries. Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Jeff Chen --- drivers/net/wireless/nxp/nxpwifi/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/nxp/nxpwifi/sdio.c b/drivers/net/wireless/nxp/nxpwifi/sdio.c index f4de494bf2f2..010f78270580 100644 --- a/drivers/net/wireless/nxp/nxpwifi/sdio.c +++ b/drivers/net/wireless/nxp/nxpwifi/sdio.c @@ -680,7 +680,7 @@ nxpwifi_sdio_poll_card_status(struct nxpwifi_adapter *adapter, u8 bits) nxpwifi_dbg(adapter, ERROR, "poll card status failed, tries = %d\n", tries); - return ret; + return ret ?: -ETIMEDOUT; } /* Disable SDIO host interrupt and release IRQ. */ -- cgit v1.2.3