mirror of https://lore.kernel.org/lkml/
 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	[flat|nested] 2+ messages in thread

* [tip:perf/core] perf tools: Fix inverted error verification bug in thread__fork
  2013-12-11  4:35 [PATCH] perf tool: Fix bug in thread__fork David Ahern
@ 2013-12-16 15:27 ` tip-bot for David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for David Ahern @ 2013-12-16 15:27 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, fweisbec, dsahern, tglx

Commit-ID:  8d00be815c05ed0f0202f606bab4e54f98fd3b30
Gitweb:     http://git.kernel.org/tip/8d00be815c05ed0f0202f606bab4e54f98fd3b30
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Tue, 10 Dec 2013 21:35:38 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 13 Dec 2013 10:30:21 -0300

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>
---
 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 49eaf1d..e394861 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;
 	}

^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome