diff options
-rw-r--r-- | kernel/trace/trace_events_filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 22c29984fe0e..a7430b16d243 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -736,7 +736,7 @@ static inline void clear_operand_string(struct filter_parse_state *ps) | |||
736 | 736 | ||
737 | static inline int append_operand_char(struct filter_parse_state *ps, char c) | 737 | static inline int append_operand_char(struct filter_parse_state *ps, char c) |
738 | { | 738 | { |
739 | if (ps->operand.tail == MAX_FILTER_STR_VAL) | 739 | if (ps->operand.tail == MAX_FILTER_STR_VAL - 1) |
740 | return -EINVAL; | 740 | return -EINVAL; |
741 | 741 | ||
742 | ps->operand.string[ps->operand.tail++] = c; | 742 | ps->operand.string[ps->operand.tail++] = c; |