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

From: Jesper Juhl
Date: Sun Dec 11 2005 - 14:32:22 EST



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


Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
---

fs/binfmt_elf.c | 2 +-
fs/binfmt_elf_fdpic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.15-rc5-git1-orig/fs/binfmt_elf.c 2005-12-04 18:48:35.000000000 +0100
+++ linux-2.6.15-rc5-git1/fs/binfmt_elf.c 2005-12-11 19:27:55.000000000 +0100
@@ -616,7 +616,7 @@ static int load_elf_binary(struct linux_
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;
--- linux-2.6.15-rc5-git1-orig/fs/binfmt_elf_fdpic.c 2005-12-04 18:48:36.000000000 +0100
+++ linux-2.6.15-rc5-git1/fs/binfmt_elf_fdpic.c 2005-12-11 19:26:41.000000000 +0100
@@ -187,7 +187,7 @@ static int load_elf_fdpic_binary(struct
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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/