aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/kernel/cpu/mtrr/main.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-07 02:14:13 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:13 +0100
commit9cfa5b5dfafcfe64c1a48906f243cdd302f82471 (patch)
treeae9c4ca7664f8474f40f47b1d76e5213c3f5ed3a /arch/i386/kernel/cpu/mtrr/main.c
parentd5d2448d896fbb9a427ee12eb8e5f6309f2473f7 (diff)
[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/main.c')
-rw-r--r--arch/i386/kernel/cpu/mtrr/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index aeea23e8a05..16bb7ea8714 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -596,10 +596,8 @@ static int mtrr_save(struct sys_device * sysdev, pm_message_t state)
int i;
int size = num_var_ranges * sizeof(struct mtrr_value);
- mtrr_state = kmalloc(size,GFP_ATOMIC);
- if (mtrr_state)
- memset(mtrr_state,0,size);
- else
+ mtrr_state = kzalloc(size,GFP_ATOMIC);
+ if (!mtrr_state)
return -ENOMEM;
for (i = 0; i < num_var_ranges; i++) {