Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE

Don't rewrite successfull allocation return values
in case the memory was marked with DMA_MEMORY_EXCLUSIVE.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Dmitry Baryshkov and committed by
Ingo Molnar
538c29d4 f6dc8cca

+1 -2
+1 -2
kernel/dma-coherent.c
··· 105 *dma_handle = mem->device_base + (page << PAGE_SHIFT); 106 *ret = mem->virt_base + (page << PAGE_SHIFT); 107 memset(*ret, 0, size); 108 - } 109 - if (mem->flags & DMA_MEMORY_EXCLUSIVE) 110 *ret = NULL; 111 } 112 return (mem != NULL);
··· 105 *dma_handle = mem->device_base + (page << PAGE_SHIFT); 106 *ret = mem->virt_base + (page << PAGE_SHIFT); 107 memset(*ret, 0, size); 108 + } else if (mem->flags & DMA_MEMORY_EXCLUSIVE) 109 *ret = NULL; 110 } 111 return (mem != NULL);