mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
ipv6: Use ERR_CAST in addrconf_dst_alloc.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a45d49d105
commit
29546a6404
1 changed files with 1 additions and 6 deletions
|
@ -2022,12 +2022,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
|
||||||
if (IS_ERR(neigh)) {
|
if (IS_ERR(neigh)) {
|
||||||
dst_free(&rt->dst);
|
dst_free(&rt->dst);
|
||||||
|
|
||||||
/* We are casting this because that is the return
|
return ERR_CAST(neigh);
|
||||||
* 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;
|
|
||||||
}
|
}
|
||||||
rt->rt6i_nexthop = neigh;
|
rt->rt6i_nexthop = neigh;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue