Message ID | 20140924152606.4f4daa63d01c55b69b1ec617@linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/base/dma-coherent.c~drivers-dma-coherent-add-initialization-from-device-tree-fix +++ a/drivers/base/dma-coherent.c @@ -40,7 +40,7 @@ static int dma_init_coherent_memory(phys goto out; dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); if (!dma_mem->bitmap) - goto free1_out; + goto out; dma_mem->virt_base = mem_base; dma_mem->device_base = device_addr; @@ -56,9 +56,8 @@ static int dma_init_coherent_memory(phys return DMA_MEMORY_IO; - free1_out: +out: kfree(dma_mem); - out: if (mem_base) iounmap(mem_base); return 0;