Thread (4 messages) 4 messages, 4 authors, 2012-06-20

Re: [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false

From: Jaehoon Chung <jh80.chung@samsung.com>
Date: 2012-06-15 07:25:36

It looks good to me.

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

On 06/15/2012 02:31 AM, Jonathan Kliegman wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 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 */
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help