]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libbpf: Fix return zero when elf_begin failed
authorPu Lehui <pulehui@huawei.com>
Wed, 15 Jan 2025 10:02:39 +0000 (10:02 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 16 Jan 2025 23:34:18 +0000 (15:34 -0800)
commit5436a54332c19df0acbef2b87cbf9f7cba56f2dd
tree0ba7857af7c0ea869c797c3d120b403f4830c3ef
parent4a04cb326a6c7f9a2c066f8c2ca78a5a9b87ddab
libbpf: Fix return zero when elf_begin failed

The error number of elf_begin is omitted when encapsulating the
btf_find_elf_sections function.

Fixes: c86f180ffc99 ("libbpf: Make btf_parse_elf process .BTF.base transparently")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250115100241.4171581-2-pulehui@huaweicloud.com
tools/lib/bpf/btf.c