public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: add checks for printing graph irq
@ 2009-12-11  9:38 Wenji Huang
  2009-12-11 11:18 ` Frederic Weisbecker
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wenji Huang @ 2009-12-11  9:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: rostedt, fweisbec, Wenji Huang

Check return value of trace_seq_printf.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_functions_graph.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 45e6c01..3fa4055 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -555,8 +555,11 @@ print_graph_irq(struct trace_iterator *iter, unsigned long addr,
 		return TRACE_TYPE_PARTIAL_LINE;
 
 	/* Don't close the duration column if haven't one */
-	if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
-		trace_seq_printf(s, " |");
+	if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
+		ret = trace_seq_printf(s, " |");
+		if (!ret)
+			return TRACE_TYPE_PARTIAL_LINE;
+	}
 	ret = trace_seq_printf(s, "\n");
 
 	if (!ret)
-- 
1.5.6


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

end of thread, other threads:[~2009-12-11 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  9:38 [PATCH] tracing: add checks for printing graph irq Wenji Huang
2009-12-11 11:18 ` Frederic Weisbecker
2009-12-11 11:19 ` Frederic Weisbecker
2009-12-11 15:00   ` Steven Rostedt
2009-12-11 17:44     ` Frederic Weisbecker
2009-12-11 15:00 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox