[PATCH net-next] net/sched: cls_api: remove redundant 0 check in tcf_qevent_init()

From: Zhengchao Shao
Date: Mon Aug 29 2022 - 03:15:15 EST


tcf_qevent_parse_block_index() has been checked the value of block_index.
Therefore, it is unnecessary to check the value of block_index in
tcf_qevent_init().

Signed-off-by: Zhengchao Shao <shaozhengchao@xxxxxxxxxx>
---
net/sched/cls_api.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 790d6809be81..72f5fd6e8e2d 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3639,9 +3639,6 @@ int tcf_qevent_init(struct tcf_qevent *qe, struct Qdisc *sch,
if (err)
return err;

- if (!block_index)
- return 0;
-
qe->info.binder_type = binder_type;
qe->info.chain_head_change = tcf_chain_head_change_dflt;
qe->info.chain_head_change_priv = &qe->filter_chain;
--
2.17.1