diff options
| author | Peng Fan <[email protected]> | 2026-07-13 21:32:52 +0800 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2026-07-29 11:15:55 +0800 |
| commit | f23b5e079a93245c01f618022fd76d189070d190 (patch) | |
| tree | debabc847fe8e108f40b553bbdd866457564c21c /include/android_bootloader_message.h | |
| parent | 616c3d79f01cf9204e38738857c4647a730dcb3b (diff) | |
mmc: fix mmc_poll_for_busy() false timeout when card is ready
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.
Reviewed-by: Tanmay Kathpalia <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include/android_bootloader_message.h')
0 files changed, 0 insertions, 0 deletions
