LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: tip-bot for YueHaibing <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jolsa@redhat.com,
acme@redhat.com, yuehaibing@huawei.com,
alexander.shishkin@linux.intel.com, peterz@infradead.org,
tglx@linutronix.de, suzuki.poulose@arm.com,
mathieu.poirier@linaro.org, hpa@zytor.com, namhyung@kernel.org
Subject: [tip:perf/urgent] perf cs-etm: Return errcode in cs_etm__process_auxtrace_info()
Date: Wed, 17 Jul 2019 16:06:56 -0700 [thread overview]
Message-ID: <tip-6285bd151b95aa28d6de9b8b9249702681f059d2@git.kernel.org> (raw)
In-Reply-To: <20190321023122.21332-3-yuehaibing@huawei.com>
Commit-ID: 6285bd151b95aa28d6de9b8b9249702681f059d2
Gitweb: https://git.kernel.org/tip/6285bd151b95aa28d6de9b8b9249702681f059d2
Author: YueHaibing <yuehaibing@huawei.com>
AuthorDate: Thu, 21 Mar 2019 10:31:22 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 11 Jul 2019 12:45:02 -0300
perf cs-etm: Return errcode in cs_etm__process_auxtrace_info()
The 'err' variable is set in the error path, but it's not returned to
callers. Don't always return -EINVAL, return err.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Link: http://lkml.kernel.org/r/20190321023122.21332-3-yuehaibing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cs-etm.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 2e9f5bc45550..3d1c34fc4d68 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -2517,8 +2517,10 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
session->auxtrace = &etm->auxtrace;
etm->unknown_thread = thread__new(999999999, 999999999);
- if (!etm->unknown_thread)
+ if (!etm->unknown_thread) {
+ err = -ENOMEM;
goto err_free_queues;
+ }
/*
* Initialize list node so that at thread__zput() we can avoid
@@ -2530,8 +2532,10 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
if (err)
goto err_delete_thread;
- if (thread__init_map_groups(etm->unknown_thread, etm->machine))
+ if (thread__init_map_groups(etm->unknown_thread, etm->machine)) {
+ err = -ENOMEM;
goto err_delete_thread;
+ }
if (dump_trace) {
cs_etm__print_auxtrace_info(auxtrace_info->priv, num_cpu);
@@ -2575,5 +2579,5 @@ err_free_traceid_list:
err_free_hdr:
zfree(&hdr);
- return -EINVAL;
+ return err;
}
next prev parent reply other threads:[~2019-07-17 23:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 2:31 [PATCH v2 0/2] minor fixes for perf cs-etm Yue Haibing
2019-03-21 2:31 ` [PATCH v2 1/2] perf cs-etm: Remove errnoeous ERR_PTR() usage in cs_etm__process_auxtrace_info Yue Haibing
2019-03-21 16:42 ` Mathieu Poirier
2019-07-17 23:06 ` [tip:perf/urgent] " tip-bot for YueHaibing
2019-03-21 2:31 ` [PATCH v2 2/2] perf cs-etm: return errcode in cs_etm__process_auxtrace_info() Yue Haibing
2019-03-21 16:44 ` Mathieu Poirier
2019-07-17 23:06 ` tip-bot for YueHaibing [this message]
2019-06-04 8:50 ` [PATCH v2 0/2] minor fixes for perf cs-etm Yuehaibing
2019-07-11 14:33 ` Yuehaibing
2019-07-11 15:46 ` Arnaldo Carvalho de Melo
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=tip-6285bd151b95aa28d6de9b8b9249702681f059d2@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=yuehaibing@huawei.com \
--subject='Re: [tip:perf/urgent] perf cs-etm: Return errcode in cs_etm__process_auxtrace_info()' \
/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
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).