netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: addrconf.c: remove unnecessary "if"
@ 2012-12-18 22:08 Cong Ding
  2012-12-19 20:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Ding @ 2012-12-18 22:08 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev, linux-kernel
  Cc: Cong Ding

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

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 net/ipv6/addrconf.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6fca01f..408cac4a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -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] = {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv6: addrconf.c: remove unnecessary "if"
  2012-12-18 22:08 [PATCH] ipv6: addrconf.c: remove unnecessary "if" Cong Ding
@ 2012-12-19 20:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-12-19 20:51 UTC (permalink / raw)
  To: dinggnu; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel

From: Cong Ding <dinggnu@gmail.com>
Date: Tue, 18 Dec 2012 23:08:56 +0100

> the value of err is always negative if it goes to errout, so we don't need to
> check the value of err.
> 
> Signed-off-by: Cong Ding <dinggnu@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-19 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 22:08 [PATCH] ipv6: addrconf.c: remove unnecessary "if" Cong Ding
2012-12-19 20:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).