[openib-general] [PATCH 8/13] Re-write cma_resolve_loopback error cases
Krishna Kumar
krkumar2 at in.ibm.com
Wed Oct 11 21:54:01 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
@@ -1542,8 +1542,10 @@ static int cma_resolve_loopback(struct r
if (!id_priv->cma_dev) {
ret = cma_bind_loopback(id_priv);
- if (ret)
- goto err;
+ if (ret) {
+ kfree(work);
+ return ret;
+ }
}
ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid);
@@ -1563,9 +1565,6 @@ static int cma_resolve_loopback(struct r
work->event.event = RDMA_CM_EVENT_ADDR_RESOLVED;
queue_work(cma_wq, &work->work);
return 0;
-err:
- kfree(work);
- return ret;
}
static int cma_bind_addr(struct rdma_cm_id *id, struct sockaddr *src_addr,
More information about the general
mailing list