struct osp_update_request *osp_update_request_create(struct dt_device *dt)
{
struct osp_update_request *our;
+ int rc;
OBD_ALLOC_PTR(our);
if (our == NULL)
INIT_LIST_HEAD(&our->our_list);
spin_lock_init(&our->our_list_lock);
- osp_object_update_request_create(our, OUT_UPDATE_INIT_BUFFER_SIZE);
+ rc = osp_object_update_request_create(our, OUT_UPDATE_INIT_BUFFER_SIZE);
+ if (rc != 0) {
+ OBD_FREE_PTR(our);
+ return ERR_PTR(rc);
+ }
return our;
}