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

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

MMC: core: Check for return value of card init



In mmc_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_power_restore.

Change-Id: Ie7886f64a81553b2f8690790c5338f65ab7e6b8c
Signed-off-by: default avatarVijay Viswanath <vviswana@codeaurora.org>
parent 1d2e9200
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2735,6 +2735,11 @@ static int mmc_power_restore(struct mmc_host *host)
	}

	ret = mmc_init_card(host, host->card->ocr, host->card);
	if (ret) {
		pr_err("%s: %s: mmc_init_card failed (%d)\n",
			mmc_hostname(host), __func__, ret);
		return ret;
	}

	ret = mmc_resume_clk_scaling(host);
	if (ret)