Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2005-02-11 02:03:23 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-11 02:03:23 -0800
commite9a592bf9b17aad3e2f6c14943e09561a558b99f (patch)
tree5f5ee105a3b3847fb51b7fd7b843aa14d7c2ff16
parent923b553aaf737afdefd902429e219c612dad567f (diff)
[PATCH] kmalloc() bug in pci-dma.c
dma_declare_coherent_memory() is calling kmalloc with wrong arguments. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/kernel/pci-dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
index 81f6cf41a865..7087b1415f64 100644
--- a/arch/i386/kernel/pci-dma.c
+++ b/arch/i386/kernel/pci-dma.c
@@ -89,11 +89,11 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
if (!mem_base)
goto out;
- dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem));
+ dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
if (!dev->dma_mem)
goto out;
memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem));
- dev->dma_mem->bitmap = kmalloc(GFP_KERNEL, bitmap_size);
+ dev->dma_mem->bitmap = kmalloc(bitmap_size, GFP_KERNEL);
if (!dev->dma_mem->bitmap)
goto free1_out;
memset(dev->dma_mem->bitmap, 0, bitmap_size);