Skip to contentSkip to conversation

omap_hsmmc: fix NULL pointer dereference

PATCH In review [email protected] 1 participant 1 message Sep 23, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 64/232 omap_hsmmc: fix NULL pointer dereference

From: Jarkko Lavinen <[email protected]>

Do not call 'mmc_omap_xfer_done()' if the request is already done.

Cc Ian Molton <[email protected]>
Cc "Roberto A. Foglietta" <[email protected]>
Cc Jarkko Lavinen <[email protected]>
Cc Denis Karpov <[email protected]>
Cc Pierre Ossman <[email protected]>
Cc Philip Langdale <[email protected]>
Cc "Madhusudhan" <[email protected]>

---

 drivers/mmc/host/omap_hsmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/omap_hsmmc.c renamed from drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-fix-null-pointer-dereference +1 -1
diff -puN drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-fix-null-pointer-dereference drivers/mmc/host/omap_hsmmc.c
@@ -677,7 +677,7 @@ static irqreturn_t mmc_omap_irq(int irq,
 
 	if (end_cmd || ((status & CC) && host->cmd))
 		mmc_omap_cmd_done(host, host->cmd);
-	if (end_trans || (status & TC))
+	if ((end_trans || (status & TC)) && host->mrq)
 		mmc_omap_xfer_done(host, data);
 
 	return IRQ_HANDLED;

_