File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -4579,7 +4579,7 @@ int ftrace_func_mapper_add_ip(struct ftrace_func_mapper *mapper,
45794579 * @ip: The instruction pointer address to remove the data from
45804580 *
45814581 * Returns the data if it is found, otherwise NULL.
4582- * Note, if the data pointer is used as the data itself, (see
4582+ * Note, if the data pointer is used as the data itself, (see
45834583 * ftrace_func_mapper_find_ip(), then the return value may be meaningless,
45844584 * if the data pointer was set to zero.
45854585 */
@@ -5311,8 +5311,6 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
53115311 goto out_unlock ;
53125312
53135313 ret = ftrace_set_filter_ip (& direct_ops , ip , 0 , 0 );
5314- if (ret )
5315- remove_hash_entry (direct_functions , entry );
53165314
53175315 if (!ret && !(direct_ops .flags & FTRACE_OPS_FL_ENABLED )) {
53185316 ret = register_ftrace_function_nolock (& direct_ops );
@@ -5321,6 +5319,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
53215319 }
53225320
53235321 if (ret ) {
5322+ remove_hash_entry (direct_functions , entry );
53245323 kfree (entry );
53255324 if (!direct -> count ) {
53265325 list_del_rcu (& direct -> next );
You can’t perform that action at this time.
0 commit comments