From: Jarkko Lavinen Date: Tue, 22 Sep 2009 23:44:54 +0000 (-0700) Subject: omap_hsmmc: fix NULL pointer dereference X-Git-Tag: v2.6.32-rc1~347 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a40e64786933fb04be37af0a19aa320bc3414a8;p=platform%2Fkernel%2Flinux-stable.git omap_hsmmc: fix NULL pointer dereference Do not call 'mmc_omap_xfer_done()' if the request is already done. Signed-off-by: Jarkko Lavinen Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b83f7a4..9519964 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -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;