perf evlist: Directly return instead of using local ret variable

Addresses this coccinelle warning:

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

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org
Link: http://lore.kernel.org/lkml/1648432532-23151-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by Haowen Bai and committed by Arnaldo Carvalho de Melo f717d89a da0bfb9f

+1 -2
+1 -2
tools/perf/util/evlist.c
··· 1331 { 1332 struct perf_cpu_map *cpus; 1333 struct perf_thread_map *threads; 1334 - int err = -ENOMEM; 1335 1336 /* 1337 * Try reading /sys/devices/system/cpu/online to get ··· 1355 out_put: 1356 perf_cpu_map__put(cpus); 1357 out: 1358 - return err; 1359 } 1360 1361 int evlist__open(struct evlist *evlist)
··· 1331 { 1332 struct perf_cpu_map *cpus; 1333 struct perf_thread_map *threads; 1334 1335 /* 1336 * Try reading /sys/devices/system/cpu/online to get ··· 1356 out_put: 1357 perf_cpu_map__put(cpus); 1358 out: 1359 + return -ENOMEM; 1360 } 1361 1362 int evlist__open(struct evlist *evlist)