提交 792db3af 编写于 作者: J Jesper Juhl 提交者: Linus Torvalds

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

Remove unneeded casts of kmalloc() return value in binfmt_elf.
Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 352d768b
无相关合并请求
...@@ -622,7 +622,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) ...@@ -622,7 +622,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
goto out_free_file; goto out_free_file;
retval = -ENOMEM; retval = -ENOMEM;
elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz, elf_interpreter = kmalloc(elf_ppnt->p_filesz,
GFP_KERNEL); GFP_KERNEL);
if (!elf_interpreter) if (!elf_interpreter)
goto out_free_file; goto out_free_file;
......
...@@ -187,7 +187,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs ...@@ -187,7 +187,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, struct pt_regs *regs
goto error; goto error;
/* read the name of the interpreter into memory */ /* 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) if (!interpreter_name)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部