aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 054bc1802bcd..576f4fa2af0d 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -521,9 +521,10 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
521 return cnt; 521 return cnt;
522 } 522 }
523 523
524 if (filter_add_pred(call, pred)) { 524 err = filter_add_pred(call, pred);
525 if (err < 0) {
525 filter_free_pred(pred); 526 filter_free_pred(pred);
526 return -EINVAL; 527 return err;
527 } 528 }
528 529
529 *ppos += cnt; 530 *ppos += cnt;
@@ -588,10 +589,11 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
588 return cnt; 589 return cnt;
589 } 590 }
590 591
591 if (filter_add_subsystem_pred(system, pred)) { 592 err = filter_add_subsystem_pred(system, pred);
593 if (err < 0) {
592 filter_free_subsystem_preds(system); 594 filter_free_subsystem_preds(system);
593 filter_free_pred(pred); 595 filter_free_pred(pred);
594 return -EINVAL; 596 return err;
595 } 597 }
596 598
597 *ppos += cnt; 599 *ppos += cnt;