diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-02-10 01:03:05 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-10 12:32:33 -0500 |
commit | 810dc73265cd690b2bc6010489b4317bba2cda39 (patch) | |
tree | 5cc203b18962bdf92dc065da933737cd04b8a2d2 /kernel | |
parent | f54fc98aa656f334c1571df6e3ca9178ea223847 (diff) |
tracing: provide correct return value after outputting the event
This patch is to make the function return early on failure, and give
correct return value on success.
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 782ec0fdf453..519a0cab1530 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -186,30 +186,30 @@ verif_pid(struct trace_seq *s, pid_t pid, int cpu, pid_t *last_pids_cpu) | |||
186 | ret = trace_seq_printf(s, | 186 | ret = trace_seq_printf(s, |
187 | " ------------------------------------------\n"); | 187 | " ------------------------------------------\n"); |
188 | if (!ret) | 188 | if (!ret) |
189 | TRACE_TYPE_PARTIAL_LINE; | 189 | return TRACE_TYPE_PARTIAL_LINE; |
190 | 190 | ||
191 | ret = print_graph_cpu(s, cpu); | 191 | ret = print_graph_cpu(s, cpu); |
192 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 192 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
193 | TRACE_TYPE_PARTIAL_LINE; | 193 | return TRACE_TYPE_PARTIAL_LINE; |
194 | 194 | ||
195 | ret = print_graph_proc(s, prev_pid); | 195 | ret = print_graph_proc(s, prev_pid); |
196 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 196 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
197 | TRACE_TYPE_PARTIAL_LINE; | 197 | return TRACE_TYPE_PARTIAL_LINE; |
198 | 198 | ||
199 | ret = trace_seq_printf(s, " => "); | 199 | ret = trace_seq_printf(s, " => "); |
200 | if (!ret) | 200 | if (!ret) |
201 | TRACE_TYPE_PARTIAL_LINE; | 201 | return TRACE_TYPE_PARTIAL_LINE; |
202 | 202 | ||
203 | ret = print_graph_proc(s, pid); | 203 | ret = print_graph_proc(s, pid); |
204 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 204 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
205 | TRACE_TYPE_PARTIAL_LINE; | 205 | return TRACE_TYPE_PARTIAL_LINE; |
206 | 206 | ||
207 | ret = trace_seq_printf(s, | 207 | ret = trace_seq_printf(s, |
208 | "\n ------------------------------------------\n\n"); | 208 | "\n ------------------------------------------\n\n"); |
209 | if (!ret) | 209 | if (!ret) |
210 | TRACE_TYPE_PARTIAL_LINE; | 210 | return TRACE_TYPE_PARTIAL_LINE; |
211 | 211 | ||
212 | return ret; | 212 | return TRACE_TYPE_HANDLED; |
213 | } | 213 | } |
214 | 214 | ||
215 | static struct ftrace_graph_ret_entry * | 215 | static struct ftrace_graph_ret_entry * |