summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2006-06-22 16:47:27 +0200
committerRoland Dreier <rolandd@cisco.com>2006-06-22 16:47:27 +0200
commit183208284e3ab3816189fc0e23faf29675ce6c9f (patch)
tree4a99c2275740be90a73e6a43aa04f8c75028a5ab /drivers
parentMerge git://oss.sgi.com:8090/xfs-2.6 (diff)
downloadlinux-183208284e3ab3816189fc0e23faf29675ce6c9f.tar.xz
linux-183208284e3ab3816189fc0e23faf29675ce6c9f.zip
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,
out_put:
put_qp_read(qp);
-out:
while (wr) {
if (is_ud && wr->wr.ud.ah)
put_ah_read(wr->wr.ud.ah);
@@ -1539,6 +1538,7 @@ out:
wr = next;
}
+out:
kfree(user_wr);
return ret ? ret : in_len;