[openib-general] [PATCH 9/13] Re-write rdma_resolve_addr error cases

Krishna Kumar krkumar2 at in.ibm.com
Wed Oct 11 21:54:08 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
@@ -1600,13 +1600,10 @@ int rdma_resolve_addr(struct rdma_cm_id 
 		ret = rdma_resolve_ip(&id->route.addr.src_addr, dst_addr,
 				      &id->route.addr.dev_addr,
 				      timeout_ms, addr_handler, id_priv);
-	if (ret)
-		goto err;
-
-	return 0;
-err:
-	cma_comp_exch(id_priv, CMA_ADDR_QUERY, CMA_ADDR_BOUND);
-	cma_deref_id(id_priv);
+	if (ret) {
+		cma_comp_exch(id_priv, CMA_ADDR_QUERY, CMA_ADDR_BOUND);
+		cma_deref_id(id_priv);
+	}
 	return ret;
 }
 EXPORT_SYMBOL(rdma_resolve_addr);




More information about the general mailing list