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

Commit 7eeeb1c5 authored by Vijay Viswanath's avatar Vijay Viswanath
Browse files

MMC: core: sd: Check for return value of sd_card init



In mmc_sd_power_restore, the return value of mmc_init_card was not
checked and the return value was getting overwritten. Added changes to
prevent loss of error information and return the error value to calling
function of mmc_sd_power_restore.

Change-Id: I170290cddb43e5ca729dc690e232e52b901ce228
Signed-off-by: default avatarVijay Viswanath <vviswana@codeaurora.org>
parent a1c3a94c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1359,6 +1359,11 @@ static int mmc_sd_power_restore(struct mmc_host *host)
	mmc_claim_host(host);
	ret = mmc_sd_init_card(host, host->card->ocr, host->card);
	mmc_release_host(host);
	if (ret) {
		pr_err("%s: %s: mmc_sd_init_card_failed (%d)\n",
				mmc_hostname(host), __func__, ret);
		return ret;
	}

	ret = mmc_resume_clk_scaling(host);
	if (ret)