This check is unnecessary since rxe_find_route6 returns NULL if CONFIG_IPV6 is disabled. Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> --- drivers/infiniband/sw/rxe/rxe_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index c53f4529f098..b0f31f849144 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -113,11 +113,9 @@ static struct dst_entry *rxe_find_route(struct net_device *ndev, saddr6 = &av->sgid_addr._sockaddr_in6.sin6_addr; daddr6 = &av->dgid_addr._sockaddr_in6.sin6_addr; dst = rxe_find_route6(ndev, saddr6, daddr6); -#if IS_ENABLED(CONFIG_IPV6) if (dst) qp->dst_cookie = rt6_get_cookie((struct rt6_info *)dst); -#endif } if (dst && (qp_type(qp) == IB_QPT_RC)) { -- 2.31.1