aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2013-12-10 23:35:38 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-13 08:30:21 -0500
commit8d00be815c05ed0f0202f606bab4e54f98fd3b30 (patch)
tree77df0152f3a3e74d911f73a10a7c8699863c32eb /tools/perf
parent71db07b12eace6a3619335d03eaf3cbe2de131ed (diff)
perf tools: Fix inverted error verification bug in thread__fork
Commit 1902efe7f for the new comm infra added the wrong check for return code on thread__set_comm. err == 0 is normal, so don't return at that point unless err != 0. Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1386736538-23525-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 49eaf1d7d89d..e3948612543e 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -126,7 +126,7 @@ int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp)
126 if (!comm) 126 if (!comm)
127 return -ENOMEM; 127 return -ENOMEM;
128 err = thread__set_comm(thread, comm, timestamp); 128 err = thread__set_comm(thread, comm, timestamp);
129 if (!err) 129 if (err)
130 return err; 130 return err;
131 thread->comm_set = true; 131 thread->comm_set = true;
132 } 132 }