From: YueHaibing <yuehaibing@huawei.com>
To: <ast@kernel.org>, <daniel@iogearbox.net>,
<quentin.monnet@netronome.com>, <jakub.kicinski@netronome.com>,
<bhole_prashant_q7@lab.ntt.co.jp>, <osk@fb.com>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<davem@davemloft.net>, YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR
Date: Tue, 24 Jul 2018 10:55:24 +0800 [thread overview]
Message-ID: <20180724025524.22012-1-yuehaibing@huawei.com> (raw)
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>
---
tools/bpf/bpftool/map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index 9c81918..0ee3ba4 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;
}
--
2.7.0
next reply other threads:[~2018-07-24 2:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 2:55 YueHaibing [this message]
2018-07-24 3:20 ` [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR David Miller
2018-07-24 3:40 ` Jakub Kicinski
2018-07-24 15:45 ` Martin KaFai Lau
2018-07-25 5:45 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180724025524.22012-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=ast@kernel.org \
--cc=bhole_prashant_q7@lab.ntt.co.jp \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=osk@fb.com \
--cc=quentin.monnet@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox