File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1252,7 +1252,7 @@ int register_ftrace_graph(struct fgraph_ops *gops)
1252
1252
int ret = 0 ;
1253
1253
int i = -1 ;
1254
1254
1255
- mutex_lock (& ftrace_lock );
1255
+ guard ( mutex ) (& ftrace_lock );
1256
1256
1257
1257
if (!fgraph_initialized ) {
1258
1258
ret = cpuhp_setup_state (CPUHP_AP_ONLINE_DYN , "fgraph_idle_init" ,
@@ -1273,10 +1273,8 @@ int register_ftrace_graph(struct fgraph_ops *gops)
1273
1273
}
1274
1274
1275
1275
i = fgraph_lru_alloc_index ();
1276
- if (i < 0 || WARN_ON_ONCE (fgraph_array [i ] != & fgraph_stub )) {
1277
- ret = - ENOSPC ;
1278
- goto out ;
1279
- }
1276
+ if (i < 0 || WARN_ON_ONCE (fgraph_array [i ] != & fgraph_stub ))
1277
+ return - ENOSPC ;
1280
1278
gops -> idx = i ;
1281
1279
1282
1280
ftrace_graph_active ++ ;
@@ -1313,8 +1311,6 @@ int register_ftrace_graph(struct fgraph_ops *gops)
1313
1311
gops -> saved_func = NULL ;
1314
1312
fgraph_lru_release_index (i );
1315
1313
}
1316
- out :
1317
- mutex_unlock (& ftrace_lock );
1318
1314
return ret ;
1319
1315
}
1320
1316
You can’t perform that action at this time.
0 commit comments