aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/dma-coherent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c
index 038707404b76..38fa292c6aa9 100644
--- a/kernel/dma-coherent.c
+++ b/kernel/dma-coherent.c
@@ -118,8 +118,8 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
118 mem = dev->dma_mem; 118 mem = dev->dma_mem;
119 if (!mem) 119 if (!mem)
120 return 0; 120 return 0;
121 if (unlikely(size > mem->size)) 121 if (unlikely(size > (mem->size << PAGE_SHIFT)))
122 return 0; 122 return 0;
123 123
124 pageno = bitmap_find_free_region(mem->bitmap, mem->size, order); 124 pageno = bitmap_find_free_region(mem->bitmap, mem->size, order);
125 if (pageno >= 0) { 125 if (pageno >= 0) {