mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] binfmt: check return value of remove_arg_zero
@ 2021-03-19 23:05 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2021-03-19 23:05 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel; +Cc: Olaf Hering, Alexander Viro

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 --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++;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-19 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:05 [PATCH v1] binfmt: check return value of remove_arg_zero Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®