diff options
-rw-r--r-- | kernel/trace/trace_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 0d6ff3555942..3efd718984fb 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -300,7 +300,7 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim, | |||
300 | unsigned long mask; | 300 | unsigned long mask; |
301 | const char *str; | 301 | const char *str; |
302 | const char *ret = p->buffer + p->len; | 302 | const char *ret = p->buffer + p->len; |
303 | int i; | 303 | int i, first = 1; |
304 | 304 | ||
305 | for (i = 0; flag_array[i].name && flags; i++) { | 305 | for (i = 0; flag_array[i].name && flags; i++) { |
306 | 306 | ||
@@ -310,8 +310,10 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim, | |||
310 | 310 | ||
311 | str = flag_array[i].name; | 311 | str = flag_array[i].name; |
312 | flags &= ~mask; | 312 | flags &= ~mask; |
313 | if (p->len && delim) | 313 | if (!first && delim) |
314 | trace_seq_puts(p, delim); | 314 | trace_seq_puts(p, delim); |
315 | else | ||
316 | first = 0; | ||
315 | trace_seq_puts(p, str); | 317 | trace_seq_puts(p, str); |
316 | } | 318 | } |
317 | 319 | ||