summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>2022-09-13 19:13:26 +0300
committerDavid S. Miller <davem@davemloft.net>2022-09-21 14:49:32 +0300
commit2a566f0148bad759ba6f3758914edda1a8a4181f (patch)
treea98957630e5fd819d935be7f5b182037f4aee1ac /net/sched
parentc29b068215906d33f75378d44526edc37ad08276 (diff)
downloadlinux-2a566f0148bad759ba6f3758914edda1a8a4181f.tar.xz
net: sched: act_ct: remove redundant variable err
Return value directly from pskb_trim_rcsum() instead of getting value from redundant variable err. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_ct.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 4dd3fac42504..9d19710835b0 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -696,7 +696,6 @@ drop_ct:
static int tcf_ct_skb_network_trim(struct sk_buff *skb, int family)
{
unsigned int len;
- int err;
switch (family) {
case NFPROTO_IPV4:
@@ -710,9 +709,7 @@ static int tcf_ct_skb_network_trim(struct sk_buff *skb, int family)
len = skb->len;
}
- err = pskb_trim_rcsum(skb, len);
-
- return err;
+ return pskb_trim_rcsum(skb, len);
}
static u8 tcf_ct_skb_nf_family(struct sk_buff *skb)