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: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent f06eec4d
...@@ -681,7 +681,8 @@ static int append_filter_string(struct event_filter *filter, ...@@ -681,7 +681,8 @@ static int append_filter_string(struct event_filter *filter,
int newlen; int newlen;
char *new_filter_string; 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; newlen = strlen(filter->filter_string) + strlen(string) + 1;
new_filter_string = kmalloc(newlen, GFP_KERNEL); new_filter_string = kmalloc(newlen, GFP_KERNEL);
if (!new_filter_string) if (!new_filter_string)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment