All of
 help / color / mirror / Atom feed
From: Steven Rostedt <>
To: LKML <>
Cc: Masami Hiramatsu <>,
	Dan Carpenter <>,
	Yunfeng Ye <>,
	Shiyuan Hu <>,
	Hewenliang <>
Subject: [PATCH] tools/bootconfig: Fix apply_xbc() to return zero on success
Date: Fri, 8 May 2020 11:13:49 -0400	[thread overview]
Message-ID: <20200508111349.3b599bde@gandalf.local.home> (raw)

From: "Steven Rostedt (VMware)" <>

The return of apply_xbc() returns the result of the last write() call, which
is not what is expected. It should only return zero on success.


Fixes: 8842604446d1 ("tools/bootconfig: Fix resource leak in apply_xbc()")
Reported-by: Dan Carpenter <>
Signed-off-by: Steven Rostedt (VMware) <>
 tools/bootconfig/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 001076c51712..0efaf45f7367 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -337,6 +337,7 @@ int apply_xbc(const char *path, const char *xbc_path)
 		pr_err("Failed to apply a boot config magic: %d\n", ret);
 		goto out;
+	ret = 0;

             reply	other threads:[~2020-05-08 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 15:13 Steven Rostedt [this message]
2020-05-08 23:14 ` [PATCH] tools/bootconfig: Fix apply_xbc() to return zero on success Masami Hiramatsu
2020-05-09  0:11   ` Masami Hiramatsu
2020-05-09  0:58     ` [PATCH] tools/bootconfig: Add a summary of test cases and return error Masami Hiramatsu

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200508111349.3b599bde@gandalf.local.home \ \ \ \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.