Commit c52d8114 authored by Matan Barak's avatar Matan Barak Committed by Doug Ledford

IB/core: A small refactor in destroy WQ handler

Instead of having uverbs_uobject_put both in the error flow and the
good flow, we unite them.

Fixes: fd3c7904 ('IB/core: Change idr objects to use the new schema')
Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
Reviewed-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d9edfc5a
...@@ -2989,18 +2989,12 @@ int ib_uverbs_ex_destroy_wq(struct ib_uverbs_file *file, ...@@ -2989,18 +2989,12 @@ int ib_uverbs_ex_destroy_wq(struct ib_uverbs_file *file,
uverbs_uobject_get(uobj); uverbs_uobject_get(uobj);
ret = uobj_remove_commit(uobj); ret = uobj_remove_commit(uobj);
if (ret) {
uverbs_uobject_put(uobj);
return ret;
}
resp.events_reported = obj->uevent.events_reported; resp.events_reported = obj->uevent.events_reported;
uverbs_uobject_put(uobj); uverbs_uobject_put(uobj);
ret = ib_copy_to_udata(ucore, &resp, resp.response_length);
if (ret) if (ret)
return 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, int ib_uverbs_ex_modify_wq(struct ib_uverbs_file *file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment