perf cs-etm: Remove errnoeous ERR_PTR() usage in cs_etm__process_auxtrace_info
authorYueHaibing <yuehaibing@huawei.com>
Thu, 21 Mar 2019 02:31:21 +0000 (10:31 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 11 Jul 2019 15:42:46 +0000 (12:42 -0300)
intlist__findnew() doesn't uses ERR_PTR() as a return mechanism
so its callers shouldn't try to extract the error using PTR_ERR(
ret) from intlist__findnew(), make cs_etm__process_auxtrace_info
return -ENOMEM instead.

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-2-yuehaibing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm.c

index 67b88b5..2e9f5bc 100644 (file)
@@ -2460,7 +2460,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;
                }