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

Commit 11f2e46a authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

mmc: core: Fix possible NULL pointer dereference



Add necessary sanity checks to fix possible NULL pointer
deference within function mmc_suspend_host().

CRs-fixed: 566915
Change-Id: I806b0384e0ba6b7d51629390d04d6cf24db27a11
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent bcb87d5a
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3617,10 +3617,13 @@ int mmc_suspend_host(struct mmc_host *host)

		if (!err) {
			if (host->bus_ops->suspend) {
				if (host->card) {
					err = mmc_stop_bkops(host->card);
					if (err)
						goto out;
				}
				err = host->bus_ops->suspend(host);
				if (host->card)
					MMC_UPDATE_BKOPS_STATS_SUSPEND(host->
						card->bkops_info.bkops_stats);
			}