summaryrefslogtreecommitdiff
path: root/tools/lib
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2021-06-12 05:35:00 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-06-15 14:58:56 +0300
commit4e164f8716853b879e2b1a21a12d54c57f11372e (patch)
tree8f65ce38c4e41fdbcbbb5b4fb25d7ac36518243a /tools/lib
parentca16b429f39b4ce013bfa7e197f25681e65a2a42 (diff)
downloadlinux-4e164f8716853b879e2b1a21a12d54c57f11372e.tar.xz
libbpf: Remove unneeded check for flags during tc detach
Coverity complained about this being unreachable code. It is right because we already enforce flags to be unset, so a check validating the flag value is redundant. Fixes: 715c5ce454a6 ("libbpf: Add low level TC-BPF management API") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210612023502.1283837-2-memxor@gmail.com
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/netlink.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/lib/bpf/netlink.c b/tools/lib/bpf/netlink.c
index d743c8721aa7..efbb50ad59d8 100644
--- a/tools/lib/bpf/netlink.c
+++ b/tools/lib/bpf/netlink.c
@@ -675,8 +675,6 @@ static int __bpf_tc_detach(const struct bpf_tc_hook *hook,
return -EINVAL;
if (priority > UINT16_MAX)
return -EINVAL;
- if (flags & ~BPF_TC_F_REPLACE)
- return -EINVAL;
if (!flush) {
if (!handle || !priority)
return -EINVAL;