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>

authored by Michael Buesch and committed by Chris Ball f6947514 9bc21848

+1 -1
+1 -1
drivers/mmc/host/omap.c
··· 832 832 return IRQ_HANDLED; 833 833 } 834 834 835 - if (end_command) 835 + if (end_command && host->cmd) 836 836 mmc_omap_cmd_done(host, host->cmd); 837 837 if (host->data != NULL) { 838 838 if (transfer_error)