From: He Kuang Date: Mon, 11 May 2015 12:28:36 +0000 (+0000) Subject: perf trace: Removed duplicated NULL test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff8f695c0ec9d73d8a9f92fe634d6476ad74e3a1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf trace: Removed duplicated NULL test No need to test trace.evlist against NULL twice. Signed-off-by: He Kuang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1431347316-30401-2-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index cbfdb9523868..96a2ebafc755 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; }