summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/trace_events_filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 27c2dbea3710..490337abed75 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1050,6 +1050,8 @@ static int replace_preds(struct event_subsystem *system,
pred = create_pred(elt->op, operand1, operand2);
add_pred:
+ if (!pred)
+ return -ENOMEM;
if (call)
err = filter_add_pred(ps, call, pred, false);
else