From: Jarkko Lavinen Date: Wed, 8 Apr 2009 08:18:32 +0000 (+0300) Subject: omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8fe29d8bcdfbf85ba26c7f3522c4bdfbc83e71d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Jarkko Lavinen Signed-off-by: Adrian Hunter Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index d765df29ee15..e62a22a7f00c 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -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);