aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorJonathan Kliegman <kliegs@chromium.org>2012-06-14 13:31:55 -0400
committerChris Ball <cjb@laptop.org>2012-07-21 00:02:09 -0400
commit3bfe619dc365e439936ed6dae36506944c44c18c (patch)
treed4e2c7df7629ee840b8d4533320630859b084e17 /drivers/mmc/host/dw_mmc.c
parente137788dd115dd9d21759a768dba5fff9685e587 (diff)
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 <kliegs@chromium.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 5a600b3b3199..72dc3cde646d 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 */