Commit d0b38229 authored by Souptick Joarder (HPE)'s avatar Souptick Joarder (HPE) Committed by Alexei Starovoitov

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: dee872e1 ("bpf: Populate kfunc BTF ID sets in struct btf")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarSouptick Joarder (HPE) <jrdr.linux@gmail.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20220219163915.125770-1-jrdr.linux@gmail.com
parent a33c0c79
......@@ -6706,7 +6706,7 @@ static int btf_populate_kfunc_set(struct btf *btf, enum btf_kfunc_hook hook,
const struct btf_kfunc_id_set *kset)
{
bool vmlinux_set = !btf_is_module(btf);
int type, ret;
int type, ret = 0;
for (type = 0; type < ARRAY_SIZE(kset->sets); type++) {
if (!kset->sets[type])
......
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