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

Commit fd620b27 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: Add NULL check for host->card"

parents 19339816 dac0670d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -563,7 +563,7 @@ static ssize_t store_enable(struct device *dev,
	struct mmc_host *host = cls_dev_to_mmc_host(dev);
	unsigned long value;

	if (!host || kstrtoul(buf, 0, &value))
	if (!host || !host->card || kstrtoul(buf, 0, &value))
		return -EINVAL;

	mmc_get_card(host->card);