tracing/function: Fix the return value of ftrace_trace_onoff_callback()
[pandora-kernel.git] / kernel / trace / trace_functions.c
index 7402144..75ef000 100644 (file)
@@ -363,7 +363,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable)
  out_reg:
        ret = register_ftrace_function_probe(glob, ops, count);
 
-       return ret;
+       return ret < 0 ? ret : 0;
 }
 
 static struct ftrace_func_command ftrace_traceon_cmd = {