diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index cbfdb9523868044ad305fb100933818ab3dfc90e..96a2ebafc75539da6d48faad0fbd0e7c41d0b9fd 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2721,11 +2721,10 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) signal(SIGFPE, sighandler_dump_stack); trace.evlist = perf_evlist__new(); - if (trace.evlist == NULL) - return -ENOMEM; if (trace.evlist == NULL) { pr_err("Not enough memory to run!\n"); + err = -ENOMEM; goto out; }