Subject: [PATCH net] ipv6: Fix addrconf_dst_alloc() failure check.

From: YOSHIFUJI Hideaki <[email-masked]>
Date: Fri, 18 Jan 2013 20:56:41 +0900

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

Signed-off-by: YOSHIFUJI Hideaki <[email-masked]>
---
 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