Skip to content

Commit

Permalink
tracing/trivial: Consolidate error return condition
Browse files Browse the repository at this point in the history
Consolidate the checks for !enabled and !param to return -EINVAL
in event_enable_func().

Link: http://lkml.kernel.org/r/1369380137-12452-1-git-send-email-harsh@linux.vnet.ibm.com

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Harsh Prateek Bora authored and Steven Rostedt committed Jun 11, 2013
1 parent 90e3c03 commit 8092e80
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,10 +2011,7 @@ event_enable_func(struct ftrace_hash *hash,
int ret;

/* hash funcs only work with set_ftrace_filter */
if (!enabled)
return -EINVAL;

if (!param)
if (!enabled || !param)
return -EINVAL;

system = strsep(&param, ":");
Expand Down

0 comments on commit 8092e80

Please sign in to comment.