1
0
Fork 0

tracing: Remove BUG_ON() from append_filter_string()

There's no reason to BUG if there's a bug in the filtering code. Simply do a
warning and return.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
hifive-unleashed-5.1
Steven Rostedt (VMware) 2018-02-22 22:32:51 -05:00
parent f06eec4d0f
commit a0ff08fd4e
1 changed files with 2 additions and 1 deletions

View File

@ -681,7 +681,8 @@ static int append_filter_string(struct event_filter *filter,
int newlen;
char *new_filter_string;
BUG_ON(!filter->filter_string);
if (WARN_ON(!filter->filter_string))
return -EINVAL;
newlen = strlen(filter->filter_string) + strlen(string) + 1;
new_filter_string = kmalloc(newlen, GFP_KERNEL);
if (!new_filter_string)