From: Shang XiaoJing <shangxiaojing@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
<jolsa@kernel.org>, <namhyung@kernel.org>,
<linux-perf-users@vger.kernel.org>
Cc: <shangxiaojing@huawei.com>
Subject: [PATCH 1/8] perf c2c: Fix error return code in perf_c2c__report
Date: Fri, 16 Sep 2022 10:56:20 +0800 [thread overview]
Message-ID: <20220916025627.13967-2-shangxiaojing@huawei.com> (raw)
In-Reply-To: <20220916025627.13967-1-shangxiaojing@huawei.com>
As the return error code of perf_c2c__report may has been assigned in
front, set the error code to -EINVAL or the specific error code of the
function.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
---
tools/perf/builtin-c2c.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 12f272811487..1fe5650d9b51 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -3110,6 +3110,8 @@ static int perf_c2c__report(int argc, const char **argv)
if (err)
goto out_mem2node;
+ err = -EINVAL;
+
if (symbol__init(&session->header.env) < 0)
goto out_mem2node;
@@ -3182,7 +3184,8 @@ static int perf_c2c__report(int argc, const char **argv)
ui_progress__finish();
- if (ui_quirks()) {
+ err = ui_quirks();
+ if (err) {
pr_err("failed to setup UI\n");
goto out_mem2node;
}
--
2.17.1
next prev parent reply other threads:[~2022-09-16 2:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 2:56 [PATCH 0/8] perf: Fix error return code Shang XiaoJing
2022-09-16 2:56 ` Shang XiaoJing [this message]
2022-09-16 2:56 ` [PATCH 2/8] perf lock: Fix error return code in __cmd_contention Shang XiaoJing
2022-09-16 2:56 ` [PATCH 3/8] perf probe: Fix error return code in perf_del_probe_events Shang XiaoJing
2022-09-16 2:56 ` [PATCH 4/8] perf record: Fix error return code in cmd_record Shang XiaoJing
2022-09-16 2:56 ` [PATCH 5/8] perf report: Fix error return code in cmd_report Shang XiaoJing
2022-09-16 2:56 ` [PATCH 6/8] perf sched: Fix error return code in perf_sched__timehist Shang XiaoJing
2022-09-16 2:56 ` [PATCH 7/8] perf stat: Fix error return code in cmd_stat Shang XiaoJing
2022-09-16 2:56 ` [PATCH 8/8] perf trace: Fix error return code in trace__replay and cmd_trace Shang XiaoJing
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=20220916025627.13967-2-shangxiaojing@huawei.com \
--to=shangxiaojing@huawei.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).