From: Masami Hiramatsu (Google) Date: Thu, 25 Sep 2025 00:56:49 +0000 (+0900) Subject: tracing: fprobe: Remove unused local variable X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90e69d291d195d35215b578d210fd3ce0e5a3f42;p=thirdparty%2Fkernel%2Flinux.git tracing: fprobe: Remove unused local variable 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) Acked-by: Menglong Dong --- diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c index 5742ace9b4b53..95e43814b85bd 100644 --- a/kernel/trace/fprobe.c +++ b/kernel/trace/fprobe.c @@ -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. */