Skip to content

Commit

Permalink
omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarkko Lavinen authored and Pierre Ossman committed Apr 8, 2009
1 parent d31f65e commit a8fe29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
/* Flush posted write */
OMAP_HSMMC_READ(host->base, STAT);

if (end_cmd || (status & CC))
if (end_cmd || ((status & CC) && host->cmd))
mmc_omap_cmd_done(host, host->cmd);
if (end_trans || (status & TC))
mmc_omap_xfer_done(host, data);
Expand Down

0 comments on commit a8fe29d

Please sign in to comment.