lkml.org 
[lkml]   [2020]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next] net: ipv6: rpl_iptunnel: simplify the return expression of rpl_do_srh()
Date
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
net/ipv6/rpl_iptunnel.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c
index 5fdf3ebb953f..f16cf45a2421 100644
--- a/net/ipv6/rpl_iptunnel.c
+++ b/net/ipv6/rpl_iptunnel.c
@@ -190,18 +190,13 @@ static int rpl_do_srh(struct sk_buff *skb, const struct rpl_lwt *rlwt)
{
struct dst_entry *dst = skb_dst(skb);
struct rpl_iptunnel_encap *tinfo;
- int err = 0;

if (skb->protocol != htons(ETH_P_IPV6))
return -EINVAL;

tinfo = rpl_encap_lwtunnel(dst->lwtstate);

- err = rpl_do_srh_inline(skb, rlwt, tinfo->srh);
- if (err)
- return err;
-
- return 0;
+ return rpl_do_srh_inline(skb, rlwt, tinfo->srh);
}

static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)
--
2.22.0
\
 
 \ /
  Last update: 2020-12-08 13:12    [W:0.057 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site