[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220112082655.667680-1-chi.minghao@zte.com.cn>
Date: Wed, 12 Jan 2022 08:26:55 +0000
From: cgel.zte@...il.com
To: davem@...emloft.net
Cc: yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] net/ipv6: remove redundant err variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from ip6_tnl_err() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
net/ipv6/ip6_tunnel.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index fe786df4f849..897194eb3b89 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -698,13 +698,12 @@ mplsip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
u8 type, u8 code, int offset, __be32 info)
{
__u32 rel_info = ntohl(info);
- int err, rel_msg = 0;
+ int rel_msg = 0;
u8 rel_type = type;
u8 rel_code = code;
- err = ip6_tnl_err(skb, IPPROTO_MPLS, opt, &rel_type, &rel_code,
+ return ip6_tnl_err(skb, IPPROTO_MPLS, opt, &rel_type, &rel_code,
&rel_msg, &rel_info, offset);
- return err;
}
static int ip4ip6_dscp_ecn_decapsulate(const struct ip6_tnl *t,
--
2.25.1
Powered by blists - more mailing lists