Skip to content

Commit 2cc512c

Browse files
YueHaibingborkmann
authored andcommitted
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: 2d3feca ("bpf: btf: print map dump and lookup with btf info") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent aea5f65 commit 2cc512c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/bpf/bpftool/map.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int get_btf(struct bpf_map_info *map_info, struct btf **btf)
230230

231231
*btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL);
232232
if (IS_ERR(*btf)) {
233-
err = PTR_ERR(btf);
233+
err = PTR_ERR(*btf);
234234
*btf = NULL;
235235
}
236236

0 commit comments

Comments
 (0)