aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2006-06-22 10:47:27 -0400
committerRoland Dreier <rolandd@cisco.com>2006-06-22 10:47:27 -0400
commit183208284e3ab3816189fc0e23faf29675ce6c9f (patch)
tree4a99c2275740be90a73e6a43aa04f8c75028a5ab /drivers
parent52ab3f3dc711eeccbfbcc5d4f5c5d9b9ff59650f (diff)
IB/uverbs: Don't free wr list when it's known to be empty
In ib_uverbs_post_send(), move the "out:" label after the loop that frees the list of work requests, since the only place that jumps there is before any work requests could possibly be added to the list. This removes a compile warning: "is_ud might be used uninitialized in this function". Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 76bf61e9b552..a908a7bdcd7f 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1530,7 +1530,6 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file,
1530out_put: 1530out_put:
1531 put_qp_read(qp); 1531 put_qp_read(qp);
1532 1532
1533out:
1534 while (wr) { 1533 while (wr) {
1535 if (is_ud && wr->wr.ud.ah) 1534 if (is_ud && wr->wr.ud.ah)
1536 put_ah_read(wr->wr.ud.ah); 1535 put_ah_read(wr->wr.ud.ah);
@@ -1539,6 +1538,7 @@ out:
1539 wr = next; 1538 wr = next;
1540 } 1539 }
1541 1540
1541out:
1542 kfree(user_wr); 1542 kfree(user_wr);
1543 1543
1544 return ret ? ret : in_len; 1544 return ret ? ret : in_len;