fs: Convert kmalloc() + memset() to kzalloc() in fs/.
authorRobert P. J. Day <rpjday@mindspring.com>
Tue, 12 Dec 2006 19:07:35 +0000 (20:07 +0100)
committerAdrian Bunk <bunk@stusta.de>
Tue, 12 Dec 2006 19:07:35 +0000 (20:07 +0100)
Convert the single available instance of kmalloc() + memset() to
kzalloc() in the fs/ directory.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/binfmt_elf_fdpic.c

index 76f06f6bc2f6caee3579092b5cc938b40ce1faed..6e6d4568d548926880112dd305e51adb8823b86d 100644 (file)
@@ -706,12 +706,11 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
                return -ELIBBAD;
 
        size = sizeof(*loadmap) + nloads * sizeof(*seg);
-       loadmap = kmalloc(size, GFP_KERNEL);
+       loadmap = kzalloc(size, GFP_KERNEL);
        if (!loadmap)
                return -ENOMEM;
 
        params->loadmap = loadmap;
-       memset(loadmap, 0, size);
 
        loadmap->version = ELF32_FDPIC_LOADMAP_VERSION;
        loadmap->nsegs = nloads;