提交 3bfe619d 编写于 作者: J Jonathan Kliegman 提交者: Chris Ball

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: NJonathan Kliegman <kliegs@chromium.org>
Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
Acked-by: NWill Newton <will.newton@imgtec.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 e137788d
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册