All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: util: Remove unneeded variable
@ 2021-04-12 23:16 Wan Jiabing
  0 siblings, 0 replies; only message in thread
From: Wan Jiabing @ 2021-04-12 23:16 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Alexey Budankov, linux-kernel
  Cc: kael_w, Wan Jiabing

Fix coccicheck warning:

./tools/perf/util/evlist.c:1316:5-8: Unneeded variable: "err". Return "- ENOMEM" on line 1341

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 tools/perf/util/evlist.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 882cd1f721d9..6c2a271605d5 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1313,7 +1313,6 @@ static int evlist__create_syswide_maps(struct evlist *evlist)
 {
 	struct perf_cpu_map *cpus;
 	struct perf_thread_map *threads;
-	int err = -ENOMEM;
 
 	/*
 	 * Try reading /sys/devices/system/cpu/online to get
@@ -1338,7 +1337,7 @@ static int evlist__create_syswide_maps(struct evlist *evlist)
 out_put:
 	perf_cpu_map__put(cpus);
 out:
-	return err;
+	return -ENOMEM;
 }
 
 int evlist__open(struct evlist *evlist)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-12 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 23:16 [PATCH] perf: util: Remove unneeded variable Wan Jiabing

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.