Skip to content

Commit

Permalink
Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Baryshkov authored and Ingo Molnar committed Jul 18, 2008
1 parent f6dc8cc commit 538c29d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/dma-coherent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 538c29d

Please sign in to comment.