From: Jesper Juhl Date: Tue, 10 Jan 2006 04:54:45 +0000 (-0800) Subject: [PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=792db3af38a55b2079df504b9f5aa57b2dbee48d;p=openwrt%2Fstaging%2Fblogic.git [PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts Remove unneeded casts of kmalloc() return value in binfmt_elf. Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 80ca932ba0bd..a4f6f57d91aa 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -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, GFP_KERNEL); if (!elf_interpreter) goto out_free_file; diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index e0344f69c79d..5b3076e8ee90 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -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;