* [PATCH] fs: binfmt_em86: check the result of remove_arg_zero()
@ 2020-12-21 12:19 Masahiro Yamada
0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2020-12-21 12:19 UTC (permalink / raw)
To: Alexander Viro, linux-fsdevel
Cc: linux-kernel, Masahiro Yamada, Guenter Roeck
Fix the following warning:
fs/binfmt_em86.c: In function 'load_em86':
fs/binfmt_em86.c:66:2: warning: ignoring return value of 'remove_arg_zero', declared with attribute warn_unused_result [-Wunused-result]
66 | remove_arg_zero(bprm);
| ^~~~~~~~~~~~~~~~~~~~~
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
fs/binfmt_em86.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
index 06b9b9fddf70..ba1e22b2e2a3 100644
--- a/fs/binfmt_em86.c
+++ b/fs/binfmt_em86.c
@@ -63,7 +63,9 @@ 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)
+ return retval;
retval = copy_string_kernel(bprm->filename, bprm);
if (retval < 0) return retval;
bprm->argc++;
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-21 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 12:19 [PATCH] fs: binfmt_em86: check the result of remove_arg_zero() Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).