2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

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>
This commit is contained in:
Harsh Prateek Bora 2013-05-24 12:52:17 +05:30 committed by Steven Rostedt
parent 90e3c03c3a
commit 8092e808a3

View File

@ -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, ":");