diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 17:10:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:14 -0500 |
commit | 5095d64db1b978bdb31d30fed9e47dbf04f729be (patch) | |
tree | a912b34b0f78b40f46fde374fae530211ef22c4c /net/ipv6/ndisc.c | |
parent | ba9adbe67e288823ac1deb7f11576ab5653f833e (diff) |
ipv6: ip6_route_output() never returns NULL.
ip6_route_output() never returns NULL, so it is wrong to
check if the return value is NULL.
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d8f02ef88e5..c964958ac47 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1545,9 +1545,10 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1545 | &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex); | 1545 | &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex); |
1546 | 1546 | ||
1547 | dst = ip6_route_output(net, NULL, &fl6); | 1547 | dst = ip6_route_output(net, NULL, &fl6); |
1548 | if (dst == NULL) | 1548 | if (dst->error) { |
1549 | dst_release(dst); | ||
1549 | return; | 1550 | return; |
1550 | 1551 | } | |
1551 | dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); | 1552 | dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); |
1552 | if (IS_ERR(dst)) | 1553 | if (IS_ERR(dst)) |
1553 | return; | 1554 | return; |