Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77c937bd authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan Committed by Matt Wagantall
Browse files

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: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent d7c118e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1424,8 +1424,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;