提交 29546a64 编写于 作者: D David S. Miller

ipv6: Use ERR_CAST in addrconf_dst_alloc.

Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a45d49d1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册