dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
RongQing.Li 2012-02-21 22:10:50 +00:00 committed by David S. Miller
parent 5095d64db1
commit 0541743b4b
1 changed files with 5 additions and 1 deletions

View File

@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
fl6.flowi6_oif = dst_addr->sin6_scope_id;
*dst = ip6_route_output(&init_net, NULL, &fl6);
if (*dst)
if ((*dst)->error) {
dst_release(*dst);
*dst = NULL;
return -ENETUNREACH;
} else
return 0;
#endif