dect
/
linux-2.6
Archived
13
0
Fork 0

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: Michael Buesch <mb@bu3sch.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
Michael Buesch 2011-04-11 17:00:44 -04:00 committed by Chris Ball
parent 9bc21848b1
commit f694751421
1 changed files with 1 additions and 1 deletions

View File

@ -832,7 +832,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
return IRQ_HANDLED;
}
if (end_command)
if (end_command && host->cmd)
mmc_omap_cmd_done(host, host->cmd);
if (host->data != NULL) {
if (transfer_error)