[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190315022649.17848-1-yuehaibing@huawei.com>
Date: Fri, 15 Mar 2019 10:26:49 +0800
From: Yue Haibing <yuehaibing@...wei.com>
To: <mathieu.poirier@...aro.org>, <suzuki.poulose@....com>,
<peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
<namhyung@...nel.org>
CC: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info
From: YueHaibing <yuehaibing@...wei.com>
'err' is set in err path, but it's not returned to callers.
Also fix a pass zero to PTR_ERR issue.
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
tools/perf/util/cs-etm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 1108049..111f33c 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -1908,7 +1908,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
/* Something went wrong, no need to continue */
if (!inode) {
- err = PTR_ERR(inode);
+ err = -ENOMEM;
goto err_free_metadata;
}
@@ -2023,5 +2023,5 @@ int cs_etm__process_auxtrace_info(union perf_event *event,
err_free_hdr:
zfree(&hdr);
- return -EINVAL;
+ return err;
}
--
2.7.0
Powered by blists - more mailing lists