aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2015-09-09 17:00:58 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2015-09-09 17:00:58 -0500
commitb00df57e50e087151f4ca976ca2796ea105f68c1 (patch)
tree041e22fd6831e8231d7405a445607979d1387775 /drivers/mmc/host/sdhci.c
parent6f7cc80865bae836c963fe4d405fe27496024f6f (diff)
parentb7be2a1de3f5c0827a4f8ccb6a18342d9d4dc446 (diff)
Merge tag 'lsk-v4.1-15.08' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1linux-lng-4.1.5-2015.09
LSK 15.08 v4.1
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d3dbb28057e9..bec8a307f8cd 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3037,8 +3037,11 @@ int sdhci_add_host(struct sdhci_host *host)
GFP_KERNEL);
host->align_buffer = kmalloc(host->align_buffer_sz, GFP_KERNEL);
if (!host->adma_table || !host->align_buffer) {
- dma_free_coherent(mmc_dev(mmc), host->adma_table_sz,
- host->adma_table, host->adma_addr);
+ if (host->adma_table)
+ dma_free_coherent(mmc_dev(mmc),
+ host->adma_table_sz,
+ host->adma_table,
+ host->adma_addr);
kfree(host->align_buffer);
pr_warn("%s: Unable to allocate ADMA buffers - falling back to standard DMA\n",
mmc_hostname(mmc));