Instead of having uverbs_uobject_put both in the error flow and the
good flow, we unite them.
Fixes: fd3c7904db6e ('IB/core: Change idr objects to use the new schema')
Signed-off-by: Matan Barak <[email protected]>
Reviewed-by: Sean Hefty <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
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,