aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-03 12:10:37 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-03 12:10:37 -0800
commit29546a6404e3a4b5d13f0a9586eb5cf1c3b25167 (patch)
treea8be742e4d7980b588103b39a6cdb5f2ac165061 /net/ipv6/route.c
parenta45d49d1053fd5954260a70e555daabd5672577d (diff)
ipv6: Use ERR_CAST in addrconf_dst_alloc.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 053a92ebf2d..59f2a58c1e3 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2022,12 +2022,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
if (IS_ERR(neigh)) {
dst_free(&rt->dst);
- /* We are casting this because that is the return
- * value type. But an errno encoded pointer is the
- * same regardless of the underlying pointer type,
- * and that's what we are returning. So this is OK.
- */
- return (struct rt6_info *) neigh;
+ return ERR_CAST(neigh);
}
rt->rt6i_nexthop = neigh;