]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Propagate errors when retrieving enum value for typed data display
authorAlan Maguire <alan.maguire@oracle.com>
Tue, 20 Jul 2021 08:49:53 +0000 (09:49 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 20 Jul 2021 20:49:25 +0000 (13:49 -0700)
commit90c2dfba10de96fe5dd6d458475401dc8562ad2f
treef4b361833faca06c98dad5083ee32277498c23a6
parentdc4d311a6524201ea44e1c415f5f8328c14019c3
libbpf: Propagate errors when retrieving enum value for typed data display

When retrieving the enum value associated with typed data during
"is data zero?" checking in btf_dump_type_data_check_zero(), the
return value of btf_dump_get_enum_value() is not passed to the caller
if the function returns a non-zero (error) value.  Currently, 0
is returned if the function returns an error.  We should instead
propagate the error to the caller.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1626770993-11073-4-git-send-email-alan.maguire@oracle.com
tools/lib/bpf/btf_dump.c