[openib-general] [PATCH 5/13] Re-write rdma_set_ib_paths error cases
Krishna Kumar
krkumar2 at in.ibm.com
Wed Oct 11 21:53:41 PDT 2006
diff -ruNp org/drivers/infiniband/core/cma.c new/drivers/infiniband/core/cma.c
--- org/drivers/infiniband/core/cma.c 2006-10-09 16:40:04.000000000 +0530
+++ new/drivers/infiniband/core/cma.c 2006-10-09 16:52:03.000000000 +0530
@@ -1348,13 +1348,12 @@ int rdma_set_ib_paths(struct rdma_cm_id
id->route.path_rec = kmalloc(sizeof *path_rec * num_paths, GFP_KERNEL);
if (!id->route.path_rec) {
ret = -ENOMEM;
- goto err;
+ cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);
+ } else {
+ ret = 0;
+ memcpy(id->route.path_rec, path_rec,
+ sizeof *path_rec * num_paths);
}
-
- memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths);
- return 0;
-err:
- cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED);
return ret;
}
EXPORT_SYMBOL(rdma_set_ib_paths);
More information about the general
mailing list