Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184993
b: refs/heads/master
c: da9d2f0
h: refs/heads/master
i:
  184991: 952539b
v: v3
  • Loading branch information
Roland Dreier committed Mar 2, 2010
1 parent 5723e7e commit 5dadade
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c03dc9f19351edf25c1107e3cfd3cc538c7ab9e
refs/heads/master: da9d2f07306fc29a2f10885c2b0a463f3863c365
31 changes: 18 additions & 13 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,14 @@ static int srp_create_target_ib(struct srp_target_port *target)
srp_recv_completion, NULL, target, SRP_RQ_SIZE, 0);
if (IS_ERR(target->recv_cq)) {
ret = PTR_ERR(target->recv_cq);
goto out;
goto err;
}

target->send_cq = ib_create_cq(target->srp_host->srp_dev->dev,
srp_send_completion, NULL, target, SRP_SQ_SIZE, 0);
if (IS_ERR(target->send_cq)) {
ret = PTR_ERR(target->send_cq);
ib_destroy_cq(target->recv_cq);
goto out;
goto err_recv_cq;
}

ib_req_notify_cq(target->recv_cq, IB_CQ_NEXT_COMP);
Expand All @@ -258,20 +257,26 @@ static int srp_create_target_ib(struct srp_target_port *target)
target->qp = ib_create_qp(target->srp_host->srp_dev->pd, init_attr);
if (IS_ERR(target->qp)) {
ret = PTR_ERR(target->qp);
ib_destroy_cq(target->send_cq);
ib_destroy_cq(target->recv_cq);
goto out;
goto err_send_cq;
}

ret = srp_init_qp(target, target->qp);
if (ret) {
ib_destroy_qp(target->qp);
ib_destroy_cq(target->send_cq);
ib_destroy_cq(target->recv_cq);
goto out;
}
if (ret)
goto err_qp;

out:
kfree(init_attr);
return 0;

err_qp:
ib_destroy_qp(target->qp);

err_send_cq:
ib_destroy_cq(target->send_cq);

err_recv_cq:
ib_destroy_cq(target->recv_cq);

err:
kfree(init_attr);
return ret;
}
Expand Down

0 comments on commit 5dadade

Please sign in to comment.