omap_hsmmc: fix NULL pointer dereference
authorJarkko Lavinen <[email protected]>
Tue, 22 Sep 2009 23:44:54 +0000 (16:44 -0700)
committerLinus Torvalds <[email protected]>
Wed, 23 Sep 2009 14:39:35 +0000 (07:39 -0700)
Do not call 'mmc_omap_xfer_done()' if the request is already done.

Signed-off-by: Jarkko Lavinen <[email protected]>
Signed-off-by: Adrian Hunter <[email protected]>
Acked-by: Matt Fleming <[email protected]>
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]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/mmc/host/omap_hsmmc.c

index b83f7a4d8e28fc2dc707a4727653704ac0642166..9519964ecb2ade297a463b58ddb2ce3f71052df7 100644 (file)
@@ -677,7 +677,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
 
        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;