2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-30 16:13:54 +08:00

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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Dan Carpenter 2015-10-22 22:53:46 +03:00 committed by Ulf Hansson
parent 1c6e58d836
commit 4539d36ef2

View File

@ -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");
if (!host->dms->ch) {
dev_err(host->dev,
"Failed to get external DMA channel %d\n",
host->dms->ch->chan_id);
dev_err(host->dev, "Failed to get external DMA channel.\n");
kfree(host->dms);
host->dms = NULL;
return -ENXIO;