[openib-general] [PATCH 2/2] Remove redundant check in cma_add_one.

Krishna Kumar krkumar2 at in.ibm.com
Sun Oct 15 21:39:08 PDT 2006


Remove redundant check in cma_add_one(). Patch made against 2.6.19-rc1 tree.

Signed-off-by: Krishna Kumar <krkumar2 at in.ibm.com>
--------
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
@@ -2114,8 +2114,6 @@ static void cma_add_one(struct ib_device

 	cma_dev->device = device;
 	cma_dev->node_guid = device->node_guid;
-	if (!cma_dev->node_guid)
-		goto err;
 
 	init_completion(&cma_dev->comp);
 	atomic_set(&cma_dev->refcount, 1);
@@ -2127,9 +2125,6 @@ static void cma_add_one(struct ib_device
 	list_for_each_entry(id_priv, &listen_any_list, list)
 		cma_listen_on_dev(id_priv, cma_dev);
 	mutex_unlock(&lock);
-	return;
-err:
-	kfree(cma_dev);
 }
 
 static int cma_remove_id_dev(struct rdma_id_private *id_priv)




More information about the general mailing list