ftrace: Have unregister_ftrace_function_probe_func() return a value

Currently unregister_ftrace_function_probe_func() is a void function. It
does not give any feedback if an error occurred or no item was found to
remove and nothing was done.

Change it to return status and success if it removed something. Also update
the callers to return that feedback to the user.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (VMware) 2017-04-04 16:44:43 -04:00
parent e16b35ddb8
commit d3d532d798
5 changed files with 17 additions and 14 deletions

View file

@ -586,10 +586,8 @@ ftrace_trace_probe_callback(struct ftrace_probe_ops *ops,
if (!enable)
return -EINVAL;
if (glob[0] == '!') {
unregister_ftrace_function_probe_func(glob+1, ops);
return 0;
}
if (glob[0] == '!')
return unregister_ftrace_function_probe_func(glob+1, ops);
if (!param)
goto out_reg;