On 7/13/2026 7:02 PM, Peng Fan (OSS) wrote:
From: Peng Fan <[email protected]>

mmc_poll_for_busy() returns a false -ETIMEDOUT if the card becomes
ready on the exact iteration where timeout_ms reaches 0. The card-ready
check breaks out of the loop, but then the post-loop check
"if (timeout_ms <= 0)" fires and returns -ETIMEDOUT despite the card
being ready.

Fix by returning 0 directly when the card is ready instead of breaking
out of the loop. The only exit from the loop is now the timeout path,
so the post-loop code unconditionally returns -ETIMEDOUT.

Signed-off-by: Peng Fan <[email protected]>

Reviewed-by: Tanmay Kathpalia <[email protected]>


Reply via email to