All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info
@ 2019-03-15  2:26 ` Yue Haibing
  0 siblings, 0 replies; 16+ messages in thread
From: Yue Haibing @ 2019-03-15  2:26 UTC (permalink / raw)
  To: mathieu.poirier, suzuki.poulose, peterz, mingo, acme,
	alexander.shishkin, jolsa, namhyung
  Cc: YueHaibing, linux-kernel, linux-arm-kernel

From: YueHaibing <yuehaibing@huawei.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@huawei.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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-03-19 16:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-15  2:26 [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info Yue Haibing
2019-03-15  2:26 ` Yue Haibing
2019-03-18 17:13 ` Mathieu Poirier
2019-03-18 17:13   ` Mathieu Poirier
2019-03-18 17:15 ` Arnaldo Carvalho de Melo
2019-03-18 17:15   ` Arnaldo Carvalho de Melo
2019-03-19 14:38   ` Mathieu Poirier
2019-03-19 14:38     ` Mathieu Poirier
2019-03-19 14:46     ` Arnaldo Carvalho de Melo
2019-03-19 14:46       ` Arnaldo Carvalho de Melo
2019-03-19 14:55       ` Mathieu Poirier
2019-03-19 14:55         ` Mathieu Poirier
2019-03-19 15:12         ` YueHaibing
2019-03-19 15:12           ` YueHaibing
2019-03-19 16:53         ` Arnaldo Carvalho de Melo
2019-03-19 16:53           ` Arnaldo Carvalho de Melo

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.