Skip to content
Snippets Groups Projects
Commit 2cc512c1 authored by YueHaibing's avatar YueHaibing Committed by Daniel Borkmann
Browse files

bpf: btf: fix inconsistent IS_ERR and PTR_ERR


Fix inconsistent IS_ERR and PTR_ERR in get_btf,
the proper pointer to be passed as argument is '*btf'

This issue was detected with the help of Coccinelle.

Fixes: 2d3feca8 ("bpf: btf: print map dump and lookup with btf info")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent aea5f654
No related branches found
No related tags found
No related merge requests found
......@@ -230,7 +230,7 @@ static int get_btf(struct bpf_map_info *map_info, struct btf **btf)
*btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL);
if (IS_ERR(*btf)) {
err = PTR_ERR(btf);
err = PTR_ERR(*btf);
*btf = NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment