mtrr: replace kmalloc+memset with kzalloc
PATCH 1/1 mtrr: replace kmalloc+memset with kzalloc
Hi.
This patch replaces kmalloc+memset with kzalloc in mtrr related files
Regards
Yan Burman
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
arch/i386/kernel/cpu/mtrr/if.c +1 -2
@@ -44,10 +44,9 @@ mtrr_file_add(unsigned long base, unsign 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) {
arch/i386/kernel/cpu/mtrr/main.c +2 -4
@@ -565,10 +565,8 @@ static int mtrr_save(struct sys_device *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++) {