File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -4947,14 +4947,14 @@ static int cache_mod(struct trace_array *tr,
4947
4947
{
4948
4948
struct ftrace_mod_load * ftrace_mod , * n ;
4949
4949
struct list_head * head = enable ? & tr -> mod_trace : & tr -> mod_notrace ;
4950
- int ret ;
4951
4950
4952
- mutex_lock (& ftrace_lock );
4951
+ guard ( mutex ) (& ftrace_lock );
4953
4952
4954
4953
/* We do not cache inverse filters */
4955
4954
if (func [0 ] == '!' ) {
4955
+ int ret = - EINVAL ;
4956
+
4956
4957
func ++ ;
4957
- ret = - EINVAL ;
4958
4958
4959
4959
/* Look to remove this hash */
4960
4960
list_for_each_entry_safe (ftrace_mod , n , head , list ) {
@@ -4970,20 +4970,15 @@ static int cache_mod(struct trace_array *tr,
4970
4970
continue ;
4971
4971
}
4972
4972
}
4973
- goto out ;
4973
+ return ret ;
4974
4974
}
4975
4975
4976
- ret = - EINVAL ;
4977
4976
/* We only care about modules that have not been loaded yet */
4978
4977
if (module_exists (module ))
4979
- goto out ;
4978
+ return - EINVAL ;
4980
4979
4981
4980
/* Save this string off, and execute it when the module is loaded */
4982
- ret = ftrace_add_mod (tr , func , module , enable );
4983
- out :
4984
- mutex_unlock (& ftrace_lock );
4985
-
4986
- return ret ;
4981
+ return ftrace_add_mod (tr , func , module , enable );
4987
4982
}
4988
4983
4989
4984
static int
You can’t perform that action at this time.
0 commit comments