diff options
author | Dave Jones <davej@redhat.com> | 2005-10-20 15:12:16 -0700 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-10-20 15:12:16 -0700 |
commit | 0ea27d9f2fb5b998063323bff47ab87891ced9e2 (patch) | |
tree | 1776e5eb03fb87184fc0e423da12acf5eb0540b7 /drivers/char/agp/amd-k7-agp.c | |
parent | 0ff541dafdcb9bc8933e7e4881e5924a408b5335 (diff) | |
download | op-kernel-dev-0ea27d9f2fb5b998063323bff47ab87891ced9e2.zip op-kernel-dev-0ea27d9f2fb5b998063323bff47ab87891ced9e2.tar.gz |
[AGPGART] Replace kmalloc+memset's with kzalloc's
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/amd-k7-agp.c')
-rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 3a41672..1f77665 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c @@ -94,19 +94,16 @@ static int amd_create_gatt_pages(int nr_tables) int retval = 0; int i; - tables = kmalloc((nr_tables + 1) * sizeof(struct amd_page_map *), - GFP_KERNEL); + tables = kzalloc((nr_tables + 1) * sizeof(struct amd_page_map *),GFP_KERNEL); if (tables == NULL) return -ENOMEM; - memset (tables, 0, sizeof(struct amd_page_map *) * (nr_tables + 1)); for (i = 0; i < nr_tables; i++) { - entry = kmalloc(sizeof(struct amd_page_map), GFP_KERNEL); + entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL); if (entry == NULL) { retval = -ENOMEM; break; } - memset (entry, 0, sizeof(struct amd_page_map)); tables[i] = entry; retval = amd_create_page_map(entry); if (retval != 0) |