Skip to content

Commit

Permalink
IB/core: A small refactor in destroy WQ handler
Browse files Browse the repository at this point in the history
Instead of having uverbs_uobject_put both in the error flow and the
good flow, we unite them.

Fixes: fd3c790 ('IB/core: Change idr objects to use the new schema')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Matan Barak authored and Doug Ledford committed Apr 20, 2017
1 parent d9edfc5 commit c52d811
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/infiniband/core/uverbs_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2989,18 +2989,12 @@ int ib_uverbs_ex_destroy_wq(struct ib_uverbs_file *file,
uverbs_uobject_get(uobj);

ret = uobj_remove_commit(uobj);
if (ret) {
uverbs_uobject_put(uobj);
return ret;
}

resp.events_reported = obj->uevent.events_reported;
uverbs_uobject_put(uobj);
ret = ib_copy_to_udata(ucore, &resp, resp.response_length);
if (ret)
return ret;

return 0;
return ib_copy_to_udata(ucore, &resp, resp.response_length);
}

int ib_uverbs_ex_modify_wq(struct ib_uverbs_file *file,
Expand Down

0 comments on commit c52d811

Please sign in to comment.