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>
This commit is contained in:
Jinpeng Cui 2022-09-13 16:13:26 +00:00 committed by David S. Miller
parent c29b068215
commit 2a566f0148

View file

@ -696,7 +696,6 @@ static bool tcf_ct_skb_nfct_cached(struct net *net, struct sk_buff *skb,
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)