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

Krishna Kumar krkumar2 at in.ibm.com
Wed Oct 11 21:54:35 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
@@ -2389,13 +2389,10 @@ static int cma_init(void)
 	ib_sa_register_client(&sa_client);
 
 	ret = ib_register_client(&cma_client);
-	if (ret)
-		goto err;
-	return 0;
-
-err:
-	ib_sa_unregister_client(&sa_client);
-	destroy_workqueue(cma_wq);
+	if (ret) {
+		ib_sa_unregister_client(&sa_client);
+		destroy_workqueue(cma_wq);
+	}
 	return ret;
 }
 




More information about the general mailing list