summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-16 02:35:01 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-16 02:35:01 +0200
commit56b880e2e38da6c76c454052a93c0a92aa3586f7 (patch)
tree3c37784b36901cafed61f5aeee7d3d7c40c3b424 /arch/x86/kernel
parentMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus... (diff)
parentx86: dma-mapping: fix broken allocation when dma_mask has been provided (diff)
downloadlinux-56b880e2e38da6c76c454052a93c0a92aa3586f7.tar.xz
linux-56b880e2e38da6c76c454052a93c0a92aa3586f7.zip
Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fixes from Marek Szyprowski: "A set of minor fixes for dma-mapping code (ARM and x86) required for Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1." * 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping: x86: dma-mapping: fix broken allocation when dma_mask has been provided ARM: dma-mapping: fix debug messages in dmabounce code ARM: mm: fix type of the arm_dma_limit global variable ARM: dma-mapping: Add missing static storage class specifier
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/pci-dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 62c9457ccd2f..c0f420f76cd3 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -100,7 +100,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
struct dma_attrs *attrs)
{
unsigned long dma_mask;
- struct page *page = NULL;
+ struct page *page;
unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
dma_addr_t addr;
@@ -108,6 +108,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
flag |= __GFP_ZERO;
again:
+ page = NULL;
if (!(flag & GFP_ATOMIC))
page = dma_alloc_from_contiguous(dev, count, get_order(size));
if (!page)