“b1ea50b2b63a95aa5a7944b48ba4d0e9b32211d3”上不存在“...x86/include/git@gitcode.net:openharmony/kernel_linux.git”
提交 4539d36e 编写于 作者: D Dan Carpenter 提交者: Ulf Hansson

mmc: dw_mmc: NULL dereference in error message

The "host->dms->ch" pointer is NULL here so we can't use it to print the
error message.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 1c6e58d8
...@@ -752,9 +752,7 @@ static int dw_mci_edmac_init(struct dw_mci *host) ...@@ -752,9 +752,7 @@ static int dw_mci_edmac_init(struct dw_mci *host)
host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx"); host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx");
if (!host->dms->ch) { if (!host->dms->ch) {
dev_err(host->dev, dev_err(host->dev, "Failed to get external DMA channel.\n");
"Failed to get external DMA channel %d\n",
host->dms->ch->chan_id);
kfree(host->dms); kfree(host->dms);
host->dms = NULL; host->dms = NULL;
return -ENXIO; return -ENXIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册