|
@@ -2978,8 +2978,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));
|