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

Commit 38835788 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: Fix possible NULL pointer dereference"

parents 46e049d2 72520263
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -47,6 +47,14 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id)
	struct mmc_gpio *ctx = host->slot.handler_priv;
	int status;

	/*
	 * In case host->ops are not yet initialized return immediately.
	 * The card will get detected later when host driver calls
	 * mmc_add_host() after host->ops are initialized.
	 */
	if (!host->ops)
		goto out;

	if (host->ops->card_event)
		host->ops->card_event(host);