diff options
| author | Venkat Gopalakrishnan <venkatg@codeaurora.org> | 2015-03-10 14:11:28 -0700 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:26:18 -0700 |
| commit | e2dffecbe77a3edb2beabc5a2836c6934ed2ad46 (patch) | |
| tree | e90f98dd697d6eb0e59676c91e60ffffcc795eb4 | |
| parent | 70a7e671d5fade5b8b419a45262a880e27cc6773 (diff) | |
mmc: sd: Use locally stored ocr on paranoid init
Prevent null pointer dereference when accessing ocr stored in the card
structure in case mmc_sd_init_card() had failed before allocating the
card structure and we are retrying the init.
Change-Id: I15365804e0986e01339ccaefdffdfaf9fd319160
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
| -rw-r--r-- | drivers/mmc/core/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 092b447ae901..99b521b79f1c 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1413,8 +1413,8 @@ int mmc_attach_sd(struct mmc_host *host) retries--; mmc_power_off(host); usleep_range(5000, 5500); - mmc_power_up(host, host->card->ocr); - mmc_select_voltage(host, host->card->ocr); + mmc_power_up(host, rocr); + mmc_select_voltage(host, rocr); continue; } break; |
