mmc: core: Set host->bus_refs properly when card is set as corrupted
With rapid hotplug test case there could be a corner case when the SD card
can go bad and removed quickly even before we try to reset the card as
part of recovery.
This will lead to reset failure with ENOMEDIUM and since recovery failed
so we set the corrupted_card flag and try to remove the card.
Since corrupted_card will be set so as part of rescan we'll remove the
card and return before setting the bus_refs properly leading to card not
getting detected after this.
Only return after setting host->bus_refs properly when card is set as
corrupted.
Change-Id: Id14790f9b28d8fa58d31b034be48db5486ccfcb7
Signed-off-by:
Sarthak Garg <sartgarg@codeaurora.org>
Loading
Please register or sign in to comment