Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8fe29d8 authored by Jarkko Lavinen's avatar Jarkko Lavinen Committed by Pierre Ossman
Browse files

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: default avatarJarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
parent d31f65e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);