Skip to content

Commit

Permalink
net/sched: cls_api: remove redundant 0 check in tcf_qevent_init()
Browse files Browse the repository at this point in the history
tcf_qevent_parse_block_index() never returns a zero block_index.
Therefore, it is unnecessary to check the value of block_index in
tcf_qevent_init().

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220901011617.14105-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Zhengchao Shao authored and Jakub Kicinski committed Sep 3, 2022
1 parent c8ef3c9 commit 2e5fb32
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -3629,9 +3629,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;
Expand Down

0 comments on commit 2e5fb32

Please sign in to comment.