lkml.org 
[lkml]   [2021]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf tools: remove unneeded variable
Date
From: ran jianping <ran.jianping@zte.com.cn>

Fix the following coccicheck review:
./tools/perf/util/evlist.c:1303:5-8: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
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 5f92319ce258..d64fe767f583 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1300,7 +1300,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
@@ -1325,7 +1324,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.25.1
\
 
 \ /
  Last update: 2021-11-22 02:43    [W:0.660 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site