summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-08 20:09:49 +0800
committerDavid S. Miller <davem@davemloft.net>2020-12-08 16:22:54 -0800
commit9faad250ce66ed4159fa095a269690d7cfdb3ce3 (patch)
tree67cede96ce8bddefd46a874e63590a0b5a400f45
parent57b0637d00a5a1921ca2b4cf5457b422006aca75 (diff)
net: ipv6: rpl_iptunnel: simplify the return expression of rpl_do_srh()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/rpl_iptunnel.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c
index 233da43dd8d7..ff691d9f4a04 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)