Commit 792db3af authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

[PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts

Remove unneeded casts of kmalloc() return value in binfmt_elf.

Signed-off-by: default avatarJesper Juhl <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 352d768b
......@@ -622,7 +622,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
goto out_free_file;
retval = -ENOMEM;
elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
elf_interpreter = kmalloc(elf_ppnt->p_filesz,
if (!elf_interpreter)
goto out_free_file;
......@@ -187,7 +187,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
goto error;
/* read the name of the interpreter into memory */
interpreter_name = (char *) kmalloc(phdr->p_filesz, GFP_KERNEL);
interpreter_name = kmalloc(phdr->p_filesz, GFP_KERNEL);
if (!interpreter_name)
goto error;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment