mmc: core: update host->card after getting RCA for SD card

During tuning the status command CMD13 needs to be sent to the
card to know the card's state upon any failure to tuning command.

Change-Id: Iaefc80305d101bd72ff22f792b1967379507a739
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
Sahitya Tummala
2015-04-17 10:52:24 -07:00
committed by Gerrit - the friendly Code Review server
parent 9c757a5b0b
commit 8d73747a77
+4 -2
View File
@@ -1045,6 +1045,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
err = mmc_send_relative_addr(host, &card->rca);
if (err)
return err;
host->card = card;
}
if (!oldcard) {
@@ -1114,12 +1115,13 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
}
}
host->card = card;
return 0;
free_card:
if (!oldcard)
if (!oldcard) {
host->card = NULL;
mmc_remove_card(card);
}
return err;
}