diff mbox series

[v1] binfmt: check return value of remove_arg_zero

Message ID 20210319230554.11991-1-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show
Series [v1] binfmt: check return value of remove_arg_zero | expand

Commit Message

Olaf Hering March 19, 2021, 11:05 p.m. UTC
In preparation to build with -Werror=unused-result, use remove_arg_zero properly.

Fixes commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 fs/binfmt_em86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
index 06b9b9fddf70..5b1c02a0250f 100644
--- a/fs/binfmt_em86.c
+++ b/fs/binfmt_em86.c
@@ -63,7 +63,8 @@  static int load_em86(struct linux_binprm *bprm)
 	 * This is done in reverse order, because of how the
 	 * user environment and arguments are stored.
 	 */
-	remove_arg_zero(bprm);
+	retval = remove_arg_zero(bprm);
+	if (retval < 0) return retval; 
 	retval = copy_string_kernel(bprm->filename, bprm);
 	if (retval < 0) return retval; 
 	bprm->argc++;