Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zheng Yongjun and committed by
David S. Miller
9faad250 57b0637d

+1 -6
+1 -6
net/ipv6/rpl_iptunnel.c
··· 190 190 { 191 191 struct dst_entry *dst = skb_dst(skb); 192 192 struct rpl_iptunnel_encap *tinfo; 193 - int err = 0; 194 193 195 194 if (skb->protocol != htons(ETH_P_IPV6)) 196 195 return -EINVAL; 197 196 198 197 tinfo = rpl_encap_lwtunnel(dst->lwtstate); 199 198 200 - err = rpl_do_srh_inline(skb, rlwt, tinfo->srh); 201 - if (err) 202 - return err; 203 - 204 - return 0; 199 + return rpl_do_srh_inline(skb, rlwt, tinfo->srh); 205 200 } 206 201 207 202 static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)