Skip to contentSkip to conversation

ipv6: addrconf.c: remove unnecessary "if"

PATCH Applied Cong Ding 2 participants 2 messages Dec 18, 2012 – Dec 19, 2012

Subsystems (3)
lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 ipv6: addrconf.c: remove unnecessary "if"

the value of err is always negative if it goes to errout, so we don't need to check the value of err.

---
 net/ipv6/addrconf.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/ipv6/addrconf.c +1 -2
index 6fca01f..408cac4a 100644
@@ -534,8 +534,7 @@ void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex,
 	rtnl_notify(skb, net, 0, RTNLGRP_IPV6_NETCONF, NULL, GFP_ATOMIC);
 	return;
 errout:
-	if (err < 0)
-		rtnl_set_sk_err(net, RTNLGRP_IPV6_NETCONF, err);
+	rtnl_set_sk_err(net, RTNLGRP_IPV6_NETCONF, err);
 }
 
 static const struct nla_policy devconf_ipv6_policy[NETCONFA_MAX+1] = {
Signature · 1 line
1.7.10.4