diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-02-21 17:10:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:30:14 -0500 |
commit | 0541743b4b35f2ddc9e490b4e354930168b60d23 (patch) | |
tree | 009a1520ba99c4150f96e3a8a79b5b21929a8028 /drivers/net/ethernet/broadcom/cnic.c | |
parent | 5095d64db1b978bdb31d30fed9e47dbf04f729be (diff) |
ethernet/broadcom: 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 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index dd3a0a232ea0..818a573669e6 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, | |||
3584 | fl6.flowi6_oif = dst_addr->sin6_scope_id; | 3584 | fl6.flowi6_oif = dst_addr->sin6_scope_id; |
3585 | 3585 | ||
3586 | *dst = ip6_route_output(&init_net, NULL, &fl6); | 3586 | *dst = ip6_route_output(&init_net, NULL, &fl6); |
3587 | if (*dst) | 3587 | if ((*dst)->error) { |
3588 | dst_release(*dst); | ||
3589 | *dst = NULL; | ||
3590 | return -ENETUNREACH; | ||
3591 | } else | ||
3588 | return 0; | 3592 | return 0; |
3589 | #endif | 3593 | #endif |
3590 | 3594 | ||