BPF: remove useless condition check
PATCH 1/1 BPF: remove useless condition check
From: zhongjun <[email protected]>
According to contents of 'linux/bpf_types.h', array size of bpf_verifier_ops will never be ZERO.
Removing useless check to make code more straight and optimal.
Signed-off-by Jun Zhong <[email protected]>
base-commit: 738a96c4a8c36950803fdd27e7c30aca92dccefd
--- kernel/bpf/verifier.c | 4 ---- 1 file changed, 4 deletions(-)
kernel/bpf/verifier.c +0 -4
@@ -17655,10 +17655,6 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, bpfptr_t uattr)int i, len, ret = -EINVAL ;bool is_priv; -/* no program is valid */ -if (ARRAY_SIZE (bpf_verifier_ops) ==0 ) -return -EINVAL ; -/* 'struct bpf_verifier_env' can be global, but since it's not small, * allocate/free it every time bpf_check() is called */
Signature · 1 line
2.20.1