Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17075
b: refs/heads/master
c: ac4e7b3
h: refs/heads/master
i:
  17073: 2614918
  17071: 68593e2
v: v3
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Jan 7, 2006
1 parent 3ea11cc commit e093257
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: ea5d4a6ad2bfd1006790666981645cab43d3afbd
refs/heads/master: ac4e7b35579de55db50d602a472858867808a9c3
13 changes: 10 additions & 3 deletions trunk/drivers/infiniband/core/uverbs_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,18 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file,
if (cmd.comp_vector >= file->device->num_comp_vectors)
return -EINVAL;

if (cmd.comp_channel >= 0)
ev_file = ib_uverbs_lookup_comp_file(cmd.comp_channel);

uobj = kmalloc(sizeof *uobj, GFP_KERNEL);
if (!uobj)
return -ENOMEM;

if (cmd.comp_channel >= 0) {
ev_file = ib_uverbs_lookup_comp_file(cmd.comp_channel);
if (!ev_file) {
ret = -EINVAL;
goto err;
}
}

uobj->uobject.user_handle = cmd.user_handle;
uobj->uobject.context = file->ucontext;
uobj->uverbs_file = file;
Expand Down Expand Up @@ -664,6 +669,8 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file,
ib_destroy_cq(cq);

err:
if (ev_file)
ib_uverbs_release_ucq(file, ev_file, uobj);
kfree(uobj);
return ret;
}
Expand Down

0 comments on commit e093257

Please sign in to comment.