diff mbox series

binfmt_elf: fix documented return value for load_elf_phdrs()

Message ID 2359389.EDbqzprbEW@mobilepool36.emlix.com (mailing list archive)
State New
Headers show
Series binfmt_elf: fix documented return value for load_elf_phdrs() | expand

Commit Message

Rolf Eike Beer Oct. 19, 2022, 7:43 a.m. UTC
This function has never returned anything but a plain NULL.

Fixes: 6a8d38945cf4 ("binfmt_elf: Hoist ELF program header loading to a function")
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
---
 fs/binfmt_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kees Cook Oct. 25, 2022, 10:24 p.m. UTC | #1
On Wed, 19 Oct 2022 09:43:01 +0200, Rolf Eike Beer wrote:
> This function has never returned anything but a plain NULL.

Applied to for-next/execve, thanks!

[1/1] binfmt_elf: fix documented return value for load_elf_phdrs()
      https://git.kernel.org/kees/c/cfc46ca4fdca
diff mbox series

Patch

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 63c7ebb0da89..cfd5f7ad019d 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -456,7 +456,7 @@  static unsigned long maximum_alignment(struct elf_phdr *cmds, int nr)
  *
  * Loads ELF program headers from the binary file elf_file, which has the ELF
  * header pointed to by elf_ex, into a newly allocated array. The caller is
- * responsible for freeing the allocated data. Returns an ERR_PTR upon failure.
+ * responsible for freeing the allocated data. Returns NULL upon failure.
  */
 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex,
 				       struct file *elf_file)