From: David Ahern Date: Wed, 11 Dec 2013 04:35:38 +0000 (-0700) Subject: perf tools: Fix inverted error verification bug in thread__fork X-Git-Tag: submit/tizen/20160422.055611~1^2~99^2~18^2~2397^2~12^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d00be815c05ed0f0202f606bab4e54f98fd3b30;p=sdk%2Femulator%2Femulator-kernel.git 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 Cc: Frederic Weisbecker Link: http://lkml.kernel.org/r/1386736538-23525-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- 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) if (!comm) return -ENOMEM; err = thread__set_comm(thread, comm, timestamp); - if (!err) + if (err) return err; thread->comm_set = true; }