lkml.org 
[lkml]   [2015]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] perf trace: Fix typo in builtin-trace.c
Date
Duplication NULL test for trace.evlist.

Signed-off-by: He Kuang <hekuang@huawei.com>
---
tools/perf/builtin-trace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index bb05e44..ca39530 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2715,11 +2715,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;
}

--
1.8.5.2


\
 
 \ /
  Last update: 2015-05-11 14:41    [W:0.054 / U:8.592 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site