mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
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>
This commit is contained in:
parent
d31f65e846
commit
a8fe29d8bc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user