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

Commit bcc08bcd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 5287f79c d1295acc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1034,6 +1034,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
		err = mmc_send_relative_addr(host, &card->rca);
		if (err)
			goto free_card;
		host->card = card;
	}

	if (!oldcard) {
@@ -1100,12 +1101,13 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
	card->clk_scaling_highest = mmc_sd_get_max_clock(card);
	card->clk_scaling_lowest = host->f_min;

	host->card = card;
	return 0;

free_card:
	if (!oldcard)
	if (!oldcard) {
		host->card = NULL;
		mmc_remove_card(card);
	}

	return err;
}