diff options
Diffstat (limited to 'arch/i386/kernel/cpu/mtrr/main.c')
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/main.c | 6 |
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 aeea23e8a050..16bb7ea87145 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) | |||
596 | int i; | 596 | int i; |
597 | int size = num_var_ranges * sizeof(struct mtrr_value); | 597 | int size = num_var_ranges * sizeof(struct mtrr_value); |
598 | 598 | ||
599 | mtrr_state = kmalloc(size,GFP_ATOMIC); | 599 | mtrr_state = kzalloc(size,GFP_ATOMIC); |
600 | if (mtrr_state) | 600 | if (!mtrr_state) |
601 | memset(mtrr_state,0,size); | ||
602 | else | ||
603 | return -ENOMEM; | 601 | return -ENOMEM; |
604 | 602 | ||
605 | for (i = 0; i < num_var_ranges; i++) { | 603 | for (i = 0; i < num_var_ranges; i++) { |