]> asedeno.scripts.mit.edu Git - linux.git/commit
btf: fix return value check in btf_vmlinux_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 16 Aug 2019 02:40:44 +0000 (02:40 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 16 Aug 2019 05:18:17 +0000 (22:18 -0700)
commite03250061b54041d3502696db421c44a4a8039f4
treecd398ab0d2a6f2c747b5af55f32ccf993aa0d042
parent82c4c3b7c76720672b84c849ffe7367801278b26
btf: fix return value check in btf_vmlinux_init()

In case of error, the function kobject_create_and_add() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/sysfs_btf.c