mmc: rk_sdmmc: fix NULL pointer in printout

This patch fix NULL pointer to chan_id while requsting
external dma channel failed.

Change-Id: I0abe1acb0a892cbaec0cadb24fe215b46e2e9abb
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
Shawn Lin
2015-10-23 17:19:50 +08:00
parent 26a23edb4c
commit cfde21f0da

View File

@@ -638,8 +638,7 @@ static int dw_mci_edmac_init(struct dw_mci *host)
host->dms->ch = dma_request_slave_channel(host->dev, "dw_mci");
if (!host->dms->ch) {
dev_err(host->dev,
"Failed to get external DMA channel %d\n",
host->dms->ch->chan_id);
"Failed to get external DMA channel\n");
kfree(host->dms);
host->dms = NULL;
return -ENXIO;