summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/ati-agp.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-10-21 00:12:16 +0200
committerDave Jones <davej@redhat.com>2005-10-21 00:12:16 +0200
commit0ea27d9f2fb5b998063323bff47ab87891ced9e2 (patch)
tree1776e5eb03fb87184fc0e423da12acf5eb0540b7 /drivers/char/agp/ati-agp.c
parent[AGPGART] Fix serverworks TLB flush. (diff)
downloadlinux-0ea27d9f2fb5b998063323bff47ab87891ced9e2.tar.xz
linux-0ea27d9f2fb5b998063323bff47ab87891ced9e2.zip
[AGPGART] Replace kmalloc+memset's with kzalloc's
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r--drivers/char/agp/ati-agp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index e572ced9100a..109582ab3704 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -116,14 +116,12 @@ static int ati_create_gatt_pages(int nr_tables)
int retval = 0;
int i;
- tables = kmalloc((nr_tables + 1) * sizeof(ati_page_map *),
- GFP_KERNEL);
+ tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL);
if (tables == NULL)
return -ENOMEM;
- memset(tables, 0, sizeof(ati_page_map *) * (nr_tables + 1));
for (i = 0; i < nr_tables; i++) {
- entry = kmalloc(sizeof(ati_page_map), GFP_KERNEL);
+ entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL);
if (entry == NULL) {
while (i>0) {
kfree (tables[i-1]);
@@ -134,7 +132,6 @@ static int ati_create_gatt_pages(int nr_tables)
retval = -ENOMEM;
break;
}
- memset(entry, 0, sizeof(ati_page_map));
tables[i] = entry;
retval = ati_create_page_map(entry);
if (retval != 0) break;