diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index c6b2edfb7fe9..93660fbbf629 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -409,6 +409,9 @@ static int init_preds(struct ftrace_event_call *call) | |||
409 | struct filter_pred *pred; | 409 | struct filter_pred *pred; |
410 | int i; | 410 | int i; |
411 | 411 | ||
412 | if (call->filter) | ||
413 | return 0; | ||
414 | |||
412 | filter = call->filter = kzalloc(sizeof(*filter), GFP_KERNEL); | 415 | filter = call->filter = kzalloc(sizeof(*filter), GFP_KERNEL); |
413 | if (!call->filter) | 416 | if (!call->filter) |
414 | return -ENOMEM; | 417 | return -ENOMEM; |
@@ -447,11 +450,9 @@ static int init_subsystem_preds(struct event_subsystem *system) | |||
447 | if (strcmp(call->system, system->name) != 0) | 450 | if (strcmp(call->system, system->name) != 0) |
448 | continue; | 451 | continue; |
449 | 452 | ||
450 | if (!call->filter) { | 453 | err = init_preds(call); |
451 | err = init_preds(call); | 454 | if (err) |
452 | if (err) | 455 | return err; |
453 | return err; | ||
454 | } | ||
455 | } | 456 | } |
456 | 457 | ||
457 | return 0; | 458 | return 0; |