summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/cpu/mtrr/if.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-07 04:14:13 +0300
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 04:14:13 +0300
commit9cfa5b5dfafcfe64c1a48906f243cdd302f82471 (patch)
treeae9c4ca7664f8474f40f47b1d76e5213c3f5ed3a /arch/i386/kernel/cpu/mtrr/if.c
parentd5d2448d896fbb9a427ee12eb8e5f6309f2473f7 (diff)
downloadlinux-9cfa5b5dfafcfe64c1a48906f243cdd302f82471.tar.xz
[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/cpu/mtrr/if.c')
-rw-r--r--arch/i386/kernel/cpu/mtrr/if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c
index 9753bc6a1f3f..5ae1705eafa6 100644
--- a/arch/i386/kernel/cpu/mtrr/if.c
+++ b/arch/i386/kernel/cpu/mtrr/if.c
@@ -44,10 +44,9 @@ mtrr_file_add(unsigned long base, unsigned long size,
max = num_var_ranges;
if (fcount == NULL) {
- fcount = kmalloc(max * sizeof *fcount, GFP_KERNEL);
+ fcount = kzalloc(max * sizeof *fcount, GFP_KERNEL);
if (!fcount)
return -ENOMEM;
- memset(fcount, 0, max * sizeof *fcount);
FILE_FCOUNT(file) = fcount;
}
if (!page) {