[PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 10 Jan 2006 04:54:45 +0000 (20:54 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:02:01 +0000 (08:02 -0800)
Remove unneeded casts of kmalloc() return value in binfmt_elf.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c

index 80ca932ba0bddaaf2d5a520d5fe408c14af508db..a4f6f57d91aa4398b1c49db596c1fec22d907cfd 100644 (file)
@@ -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;
index e0344f69c79d971ce4fb95992ca4d3e13f32fbe5..5b3076e8ee906a62d16be19588779a125cba4a86 100644 (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;