aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v32/drivers/pci/dma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c
index 832fc63504d4..66f9500fbc02 100644
--- a/arch/cris/arch-v32/drivers/pci/dma.c
+++ b/arch/cris/arch-v32/drivers/pci/dma.c
@@ -91,14 +91,12 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
91 if (!mem_base) 91 if (!mem_base)
92 goto out; 92 goto out;
93 93
94 dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); 94 dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
95 if (!dev->dma_mem) 95 if (!dev->dma_mem)
96 goto out; 96 goto out;
97 memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem)); 97 dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
98 dev->dma_mem->bitmap = kmalloc(bitmap_size, GFP_KERNEL);
99 if (!dev->dma_mem->bitmap) 98 if (!dev->dma_mem->bitmap)
100 goto free1_out; 99 goto free1_out;
101 memset(dev->dma_mem->bitmap, 0, bitmap_size);
102 100
103 dev->dma_mem->virt_base = mem_base; 101 dev->dma_mem->virt_base = mem_base;
104 dev->dma_mem->device_base = device_addr; 102 dev->dma_mem->device_base = device_addr;