summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorHarsh Prateek Bora <harsh@linux.vnet.ibm.com>2013-05-24 12:52:17 +0530
committerSteven Rostedt <rostedt@goodmis.org>2013-06-11 18:38:49 -0400
commit8092e808a31839c502a52d391b15f31c1d8764f5 (patch)
tree1ff012dac3fa01d07b6e9e51b026b877856bb176 /kernel/trace/trace_events.c
parent90e3c03c3a09a7b176b3fe59d78f5d9755ac8e37 (diff)
downloadlinux-8092e808a31839c502a52d391b15f31c1d8764f5.tar.gz
linux-8092e808a31839c502a52d391b15f31c1d8764f5.tar.bz2
linux-8092e808a31839c502a52d391b15f31c1d8764f5.zip
tracing/trivial: Consolidate error return condition
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>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 27963e2bf4bf..db086f172cf5 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -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, ":");