mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
fs: Convert kmalloc() + memset() to kzalloc() in fs/.
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>
This commit is contained in:
parent
df4365ce88
commit
b87576d59b
1 changed files with 1 additions and 2 deletions
|
@ -706,12 +706,11 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
|
||||||
return -ELIBBAD;
|
return -ELIBBAD;
|
||||||
|
|
||||||
size = sizeof(*loadmap) + nloads * sizeof(*seg);
|
size = sizeof(*loadmap) + nloads * sizeof(*seg);
|
||||||
loadmap = kmalloc(size, GFP_KERNEL);
|
loadmap = kzalloc(size, GFP_KERNEL);
|
||||||
if (!loadmap)
|
if (!loadmap)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
params->loadmap = loadmap;
|
params->loadmap = loadmap;
|
||||||
memset(loadmap, 0, size);
|
|
||||||
|
|
||||||
loadmap->version = ELF32_FDPIC_LOADMAP_VERSION;
|
loadmap->version = ELF32_FDPIC_LOADMAP_VERSION;
|
||||||
loadmap->nsegs = nloads;
|
loadmap->nsegs = nloads;
|
||||||
|
|
Loading…
Reference in a new issue