diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-07-24 10:55:24 +0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-25 07:43:31 +0200 |
commit | 2cc512c1fa1ee99879d55d1cb4e3fd0e6eab35b3 (patch) | |
tree | a0fa61d6fc238f53e1ff6fb6617169619fd72345 /tools/bpf | |
parent | aea5f654e6b78a0c976f7a25950155932c77a53f (diff) | |
download | linux-stable-2cc512c1fa1ee99879d55d1cb4e3fd0e6eab35b3.tar.gz linux-stable-2cc512c1fa1ee99879d55d1cb4e3fd0e6eab35b3.tar.bz2 linux-stable-2cc512c1fa1ee99879d55d1cb4e3fd0e6eab35b3.zip |
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: 2d3feca8c44f ("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>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index 9c8191845585..0ee3ba479d87 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -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; } |