diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-04 16:44:43 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-04-20 22:06:42 -0400 |
commit | d3d532d798c5720055ab02a10bf7829a33c3645a (patch) | |
tree | 3d5d3ac5e0fba823e06b59b004580a5e4f4d3c8a /kernel/trace/trace.c | |
parent | e16b35ddb840788e023fac2482b61c0b6bf98057 (diff) | |
download | lwn-d3d532d798c5720055ab02a10bf7829a33c3645a.tar.gz lwn-d3d532d798c5720055ab02a10bf7829a33c3645a.zip |
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>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7a4d578d8887..64a4418a5106 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6829,10 +6829,8 @@ ftrace_trace_snapshot_callback(struct ftrace_hash *hash, ops = param ? &snapshot_count_probe_ops : &snapshot_probe_ops; - 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; |