From: Olaf Hering <olaf@aepfle.de>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Olaf Hering <olaf@aepfle.de>, Alexander Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH v1] binfmt: check return value of remove_arg_zero
Date: Sat, 20 Mar 2021 00:05:53 +0100 [thread overview]
Message-ID: <20210319230554.11991-1-olaf@aepfle.de> (raw)
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++;
reply other threads:[~2021-03-19 23:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210319230554.11991-1-olaf@aepfle.de \
--to=olaf@aepfle.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®