]> Gentwo Git Trees - linux/.git/commitdiff
tracing: fprobe: Remove unused local variable
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 25 Sep 2025 00:56:49 +0000 (09:56 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Fri, 31 Oct 2025 16:10:29 +0000 (01:10 +0900)
The 'ret' local variable in fprobe_remove_node_in_module() was used
for checking the error state in the loop, but commit dfe0d675df82
("tracing: fprobe: use rhltable for fprobe_ip_table") removed the loop.
So we don't need it anymore.

Link: https://lore.kernel.org/all/175867358989.600222.6175459620045800878.stgit@devnote2/
Fixes: e5a4cc28a052 ("tracing: fprobe: use rhltable for fprobe_ip_table")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Menglong Dong <menglong8.dong@gmail.com>
kernel/trace/fprobe.c

index 5742ace9b4b534f00aada8a634cead9d8a4547cf..95e43814b85bd1c66e3a1262e4ee5d31c4af81db 100644 (file)
@@ -458,8 +458,6 @@ static int fprobe_addr_list_add(struct fprobe_addr_list *alist, unsigned long ad
 static void fprobe_remove_node_in_module(struct module *mod, struct fprobe_hlist_node *node,
                                         struct fprobe_addr_list *alist)
 {
-       int ret = 0;
-
        if (!within_module(node->addr, mod))
                return;
        if (delete_fprobe_node(node))
@@ -468,8 +466,7 @@ static void fprobe_remove_node_in_module(struct module *mod, struct fprobe_hlist
         * If failed to update alist, just continue to update hlist.
         * Therefore, at list user handler will not hit anymore.
         */
-       if (!ret)
-               ret = fprobe_addr_list_add(alist, node->addr);
+       fprobe_addr_list_add(alist, node->addr);
 }
 
 /* Handle module unloading to manage fprobe_ip_table. */