public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false
@ 2012-06-14 17:31 Jonathan Kliegman
  2012-06-15  7:25 ` Jaehoon Chung
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Kliegman @ 2012-06-14 17:31 UTC (permalink / raw)
  To: linux-mmc; +Cc: Jonathan Kliegman

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 <kliegs@chromium.org>
---
 drivers/mmc/host/dw_mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ca5e72..e2758d5 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2175,7 +2175,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 */
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-20  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 17:31 [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false Jonathan Kliegman
2012-06-15  7:25 ` Jaehoon Chung
2012-06-15 13:14   ` Will Newton
2012-06-20  6:34     ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox