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

Commit f6947514 authored by Michael Buesch's avatar Michael Buesch Committed by Chris Ball
Browse files

mmc: omap: Fix possible NULL pointer deref



Either OMAP_MMC_STAT_CARD_ERR or OMAP_MMC_STAT_END_OF_CMD might fire
if there is no host->cmd pointer.

Check for a valid host->cmd pointer before calling mmc_omap_cmd_done().

Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 9bc21848
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -832,7 +832,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
		return IRQ_HANDLED;
		return IRQ_HANDLED;
	}
	}


	if (end_command)
	if (end_command && host->cmd)
		mmc_omap_cmd_done(host, host->cmd);
		mmc_omap_cmd_done(host, host->cmd);
	if (host->data != NULL) {
	if (host->data != NULL) {
		if (transfer_error)
		if (transfer_error)