diff options
author | Michael Buesch <mb@bu3sch.de> | 2011-04-11 23:00:44 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-04-28 01:15:12 +0200 |
commit | f69475142136c8ad9b9c717aea2ff907aed9f863 (patch) | |
tree | b8eec05f142ef6b8563f64828362dfba816074d6 /drivers/mmc | |
parent | mmc: core: mmc_add_card(): fix missing break in switch statement (diff) | |
download | linux-f69475142136c8ad9b9c717aea2ff907aed9f863.tar.xz linux-f69475142136c8ad9b9c717aea2ff907aed9f863.zip |
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/omap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 2e032f0e8cf4..a6c329040140 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -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) |