Skip to content

Commit d0b3822

Browse files
Souptick Joarder (HPE)Alexei Starovoitov
authored andcommitted
bpf: Initialize ret to 0 inside btf_populate_kfunc_set()
Kernel test robot reported below error -> kernel/bpf/btf.c:6718 btf_populate_kfunc_set() error: uninitialized symbol 'ret'. Initialize ret to 0. Fixes: dee872e ("bpf: Populate kfunc BTF ID sets in struct btf") Reported-by: kernel test robot <[email protected]> Signed-off-by: Souptick Joarder (HPE) <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Kumar Kartikeya Dwivedi <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent a33c0c7 commit d0b3822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/btf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6706,7 +6706,7 @@ static int btf_populate_kfunc_set(struct btf *btf, enum btf_kfunc_hook hook,
67066706
const struct btf_kfunc_id_set *kset)
67076707
{
67086708
bool vmlinux_set = !btf_is_module(btf);
6709-
int type, ret;
6709+
int type, ret = 0;
67106710

67116711
for (type = 0; type < ARRAY_SIZE(kset->sets); type++) {
67126712
if (!kset->sets[type])

0 commit comments

Comments
 (0)