aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/i460-agp.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-10-20 18:12:16 -0400
committerDave Jones <davej@redhat.com>2005-10-20 18:12:16 -0400
commit0ea27d9f2fb5b998063323bff47ab87891ced9e2 (patch)
tree1776e5eb03fb87184fc0e423da12acf5eb0540b7 /drivers/char/agp/i460-agp.c
parent0ff541dafdcb9bc8933e7e4881e5924a408b5335 (diff)
[AGPGART] Replace kmalloc+memset's with kzalloc's
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/i460-agp.c')
-rw-r--r--drivers/char/agp/i460-agp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 94943298c03e..75acb960558f 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -225,10 +225,9 @@ static int i460_configure (void)
225 */ 225 */
226 if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) { 226 if (I460_IO_PAGE_SHIFT > PAGE_SHIFT) {
227 size = current_size->num_entries * sizeof(i460.lp_desc[0]); 227 size = current_size->num_entries * sizeof(i460.lp_desc[0]);
228 i460.lp_desc = kmalloc(size, GFP_KERNEL); 228 i460.lp_desc = kzalloc(size, GFP_KERNEL);
229 if (!i460.lp_desc) 229 if (!i460.lp_desc)
230 return -ENOMEM; 230 return -ENOMEM;
231 memset(i460.lp_desc, 0, size);
232 } 231 }
233 return 0; 232 return 0;
234} 233}
@@ -364,13 +363,12 @@ static int i460_alloc_large_page (struct lp_desc *lp)
364 } 363 }
365 364
366 map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8; 365 map_size = ((I460_KPAGES_PER_IOPAGE + BITS_PER_LONG - 1) & -BITS_PER_LONG)/8;
367 lp->alloced_map = kmalloc(map_size, GFP_KERNEL); 366 lp->alloced_map = kzalloc(map_size, GFP_KERNEL);
368 if (!lp->alloced_map) { 367 if (!lp->alloced_map) {
369 free_pages((unsigned long) lpage, order); 368 free_pages((unsigned long) lpage, order);
370 printk(KERN_ERR PFX "Out of memory, we're in trouble...\n"); 369 printk(KERN_ERR PFX "Out of memory, we're in trouble...\n");
371 return -ENOMEM; 370 return -ENOMEM;
372 } 371 }
373 memset(lp->alloced_map, 0, map_size);
374 372
375 lp->paddr = virt_to_gart(lpage); 373 lp->paddr = virt_to_gart(lpage);
376 lp->refcount = 0; 374 lp->refcount = 0;