From: Jonathan Kliegman Date: Thu, 14 Jun 2012 17:31:55 +0000 (-0400) Subject: mmc: dw_mmc: Fix null dma_ops access when use_dma is false X-Git-Tag: v3.6-rc1~153^2~49 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=3bfe619dc365e439936ed6dae36506944c44c18c;p=~emulex%2Finfiniband.git mmc: dw_mmc: Fix null dma_ops access when use_dma is false host->dma_ops is not valid if host->usa dma is 0 so protect host->dma_ops reference in dw_mci_resume Signed-off-by: Jonathan Kliegman Acked-by: Jaehoon Chung Acked-by: Will Newton Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 5a600b3b319..72dc3cde646 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2186,7 +2186,7 @@ int dw_mci_resume(struct dw_mci *host) return ret; } - if (host->dma_ops->init) + if (host->use_dma && host->dma_ops->init) host->dma_ops->init(host); /* Restore the old value at FIFOTH register */