diff mbox series

[05/13] x86/aout: Pass a NULL pointer to kernel_read

Message ID 20201003025534.21045-6-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Clean up kernel_read/kernel_write | expand

Commit Message

Matthew Wilcox (Oracle) Oct. 3, 2020, 2:55 a.m. UTC
We want to start at 0 and do not care about the updated value.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 arch/x86/ia32/ia32_aout.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c
index a09fc37ead9d..f2029db06e2b 100644
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -247,10 +247,9 @@  static int load_aout_library(struct file *file)
 	unsigned long bss, start_addr, len, error;
 	int retval;
 	struct exec ex;
-	loff_t pos = 0;
 
 	retval = -ENOEXEC;
-	error = kernel_read(file, &ex, sizeof(ex), &pos);
+	error = kernel_read(file, &ex, sizeof(ex), NULL);
 	if (error != sizeof(ex))
 		goto out;