All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tool: Fix bug in thread__fork
@ 2013-12-11  4:35 David Ahern
  2013-12-16 15:27 ` [tip:perf/core] perf tools: Fix inverted error verification " tip-bot for David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2013-12-11  4:35 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: David Ahern, Frederic Weisbecker

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>
---
 tools/perf/util/thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
1.8.3.4 (Apple Git-47)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-16 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11  4:35 [PATCH] perf tool: Fix bug in thread__fork David Ahern
2013-12-16 15:27 ` [tip:perf/core] perf tools: Fix inverted error verification " tip-bot for David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.