aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJarkko Lavinen <jarkko.lavinen@nokia.com>2009-04-08 04:18:32 -0400
committerPierre Ossman <pierre@ossman.eu>2009-04-08 14:43:38 -0400
commita8fe29d8bcdfbf85ba26c7f3522c4bdfbc83e71d (patch)
tree1a70e1da0502a26b9c0544c84acf026975b49922 /drivers/mmc
parentd31f65e8464927f2cfdee6b0b01b9e3a8ce5db9c (diff)
omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs
With spurious interrupt cmd can be null even when we have CC set in irq status. Fixes: NB#106295 - prevent potential kernel crash in the MMC driver Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d765df29ee15..e62a22a7f00c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -493,7 +493,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
493 /* Flush posted write */ 493 /* Flush posted write */
494 OMAP_HSMMC_READ(host->base, STAT); 494 OMAP_HSMMC_READ(host->base, STAT);
495 495
496 if (end_cmd || (status & CC)) 496 if (end_cmd || ((status & CC) && host->cmd))
497 mmc_omap_cmd_done(host, host->cmd); 497 mmc_omap_cmd_done(host, host->cmd);
498 if (end_trans || (status & TC)) 498 if (end_trans || (status & TC))
499 mmc_omap_xfer_done(host, data); 499 mmc_omap_xfer_done(host, data);