From: Jarkko Lavinen <jarkko.lavi...@nokia.com>

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

Signed-off-by: Jarkko Lavinen <jarkko.lavi...@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hun...@nokia.com>
Acked-by: Matt Fleming <m...@console-pimps.org>
Cc: Ian Molton <i...@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglie...@gmail.com>
Cc: Jarkko Lavinen <jarkko.lavi...@nokia.com>
Cc: Denis Karpov <ext-denis.2.kar...@nokia.com>
Cc: Pierre Ossman <pie...@ossman.eu>
Cc: Philip Langdale <phil...@overt.org>
Cc: "Madhusudhan" <madhu...@ti.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---

 drivers/mmc/host/omap_hsmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-fix-null-pointer-dereference 
drivers/mmc/host/omap_hsmmc.c
--- a/drivers/mmc/host/omap_hsmmc.c~omap_hsmmc-fix-null-pointer-dereference
+++ a/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;
_
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to