libbpf: Return err if bpf_object__load failed
authorMao Wenan <maowenan@huawei.com>
Sun, 26 Apr 2020 06:36:35 +0000 (14:36 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 27 Apr 2020 12:43:20 +0000 (14:43 +0200)
commite411eb257b331bf44cbe8845b5351260c8222c6c
tree170b90071dc2c6fa576a1586698d4cbee4da60ee
parentf131bd3eee9745cc77701296e8bb7ca2b8d3345b
libbpf: Return err if bpf_object__load failed

bpf_object__load() has various return code, when it failed to load
object, it must return err instead of -EINVAL.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200426063635.130680-3-maowenan@huawei.com
tools/lib/bpf/libbpf.c