summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events_filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index a764aec3c9a1..819a13c3e13c 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -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)