Commit 9052e4e8 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Alexei Starovoitov

fprobe: Fix smatch type mismatch warning

Fix the type mismatching warning of 'rethook_node vs fprobe_rethook_node'
found by Smatch.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/164802092611.1732982.12268174743437084619.stgit@devnote2
parent 8c1b2119
...@@ -150,15 +150,15 @@ static int fprobe_init_rethook(struct fprobe *fp, int num) ...@@ -150,15 +150,15 @@ static int fprobe_init_rethook(struct fprobe *fp, int num)
fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler); fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler);
for (i = 0; i < size; i++) { for (i = 0; i < size; i++) {
struct rethook_node *node; struct fprobe_rethook_node *node;
node = kzalloc(sizeof(struct fprobe_rethook_node), GFP_KERNEL); node = kzalloc(sizeof(*node), GFP_KERNEL);
if (!node) { if (!node) {
rethook_free(fp->rethook); rethook_free(fp->rethook);
fp->rethook = NULL; fp->rethook = NULL;
return -ENOMEM; return -ENOMEM;
} }
rethook_add_node(fp->rethook, node); rethook_add_node(fp->rethook, &node->node);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment