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>
This commit is contained in:
Jonathan Kliegman 2012-06-14 13:31:55 -04:00 коммит произвёл Chris Ball
Родитель e137788dd1
Коммит 3bfe619dc3
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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 */