diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-07-18 13:29:57 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 21:14:01 +0200 |
commit | 538c29d43ebdac2edcef96ac07982d2296a63077 (patch) | |
tree | c68b2e64c9c10e02adf6d24390df16d0f7dcb530 /kernel/dma-coherent.c | |
parent | f6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c (diff) | |
download | kernel-crypto-538c29d43ebdac2edcef96ac07982d2296a63077.tar.gz kernel-crypto-538c29d43ebdac2edcef96ac07982d2296a63077.tar.xz kernel-crypto-538c29d43ebdac2edcef96ac07982d2296a63077.zip |
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>
Diffstat (limited to 'kernel/dma-coherent.c')
-rw-r--r-- | kernel/dma-coherent.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c index 89a554cfd93..56dff5cb0f2 100644 --- a/kernel/dma-coherent.c +++ b/kernel/dma-coherent.c @@ -105,8 +105,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size, *dma_handle = mem->device_base + (page << PAGE_SHIFT); *ret = mem->virt_base + (page << PAGE_SHIFT); memset(*ret, 0, size); - } - if (mem->flags & DMA_MEMORY_EXCLUSIVE) + } else if (mem->flags & DMA_MEMORY_EXCLUSIVE) *ret = NULL; } return (mem != NULL); |