diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 875e34e0b235d93a68b44290fbc7f1417104773c..09b4b13fdbee05eb697c556e1c4a45ec2d5a520d 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1683,6 +1683,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id, } memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths); + id->route.num_paths = num_paths; return 0; err: cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);