提交 0541743b 编写于 作者: R RongQing.Li 提交者: David S. Miller

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