diff options
author | Roi Dayan | 2021-04-28 09:05:32 +0300 |
---|---|---|
committer | Jakub Kicinski | 2021-04-28 13:51:18 -0700 |
commit | 9be02dd3858137f7bf83320568279eeda59faf01 (patch) | |
tree | 97d75f48b39ce288ddb84503229e8c76ce19b53a /net | |
parent | e542d29ca81d005651680a0a697b72ca13ddc4cc (diff) |
net/sched: act_ct: Remove redundant ct get and check
The assignment is not being used and redundant.
The check for null is redundant as nf_conntrack_put() also
checks this.
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Link: https://lore.kernel.org/r/20210428060532.3330974-1-roid@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/act_ct.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index 48fdf7293dea..ec7a1c438df9 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -991,9 +991,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a, /* Associate skb with specified zone. */ if (tmpl) { - ct = nf_ct_get(skb, &ctinfo); - if (skb_nfct(skb)) - nf_conntrack_put(skb_nfct(skb)); + nf_conntrack_put(skb_nfct(skb)); nf_conntrack_get(&tmpl->ct_general); nf_ct_set(skb, tmpl, IP_CT_NEW); } |