Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143118
b: refs/heads/master
c: 44e9c8b
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 12, 2009
1 parent ea32435 commit a918b91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3e0ab050774117d4a6173087c8bf3888662a83f
refs/heads/master: 44e9c8b7adc52079f0535f9de0c2c2477831389b
10 changes: 6 additions & 4 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,10 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
return cnt;
}

if (filter_add_pred(call, pred)) {
err = filter_add_pred(call, pred);
if (err < 0) {
filter_free_pred(pred);
return -EINVAL;
return err;
}

*ppos += cnt;
Expand Down Expand Up @@ -588,10 +589,11 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
return cnt;
}

if (filter_add_subsystem_pred(system, pred)) {
err = filter_add_subsystem_pred(system, pred);
if (err < 0) {
filter_free_subsystem_preds(system);
filter_free_pred(pred);
return -EINVAL;
return err;
}

*ppos += cnt;
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/trace/trace_events_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static int __filter_add_pred(struct ftrace_event_call *call,
}
}

return -ENOMEM;
return -ENOSPC;
}

static int is_string_field(const char *type)
Expand Down Expand Up @@ -319,7 +319,7 @@ int filter_add_subsystem_pred(struct event_subsystem *system,
}

if (i == MAX_FILTER_PRED)
return -EINVAL;
return -ENOSPC;

events_for_each(call) {
int err;
Expand Down

0 comments on commit a918b91

Please sign in to comment.