All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipv6: Fix addrconf_dst_alloc() failure check.
@ 2013-01-18 11:56 YOSHIFUJI Hideaki
  2013-01-18 14:28 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: YOSHIFUJI Hideaki @ 2013-01-18 11:56 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: YOSHIFUJI Hideaki

The function returns NULL on error and it never return error code
embedded in pointer.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
 net/ipv6/addrconf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 420e563..d0a2df2b 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -783,8 +783,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
 	}
 
 	rt = addrconf_dst_alloc(idev, addr, false);
-	if (IS_ERR(rt)) {
-		err = PTR_ERR(rt);
+	if (!rt) {
+		err = -ENOMEM;
 		goto out;
 	}
 
-- 
1.7.9.5

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

end of thread, other threads:[~2013-01-18 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 11:56 [PATCH net] ipv6: Fix addrconf_dst_alloc() failure check YOSHIFUJI Hideaki
2013-01-18 14:28 ` Eric Dumazet
2013-01-18 14:38   ` YOSHIFUJI Hideaki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.