if (mgr_attrts->word_size == 0)
status = -EINVAL;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = dev_get_chnl_mgr(hdev_obj, &hchnl_mgr);
- if (DSP_SUCCEEDED(status) && hchnl_mgr != NULL)
+ if (!status && hchnl_mgr != NULL)
status = -EEXIST;
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
struct bridge_drv_interface *intf_fxns;
dev_get_intf_fxns(hdev_obj, &intf_fxns);
/* Let Bridge channel module finish the create: */
status = (*intf_fxns->pfn_chnl_create) (&hchnl_mgr, hdev_obj,
mgr_attrts);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Fill in DSP API channel module's fields of the
* chnl_mgr structure */
chnl_mgr_obj = (struct chnl_mgr_ *)hchnl_mgr;
sys_info.dw_page_size = PAGE_SIZE;
sys_info.dw_allocation_granularity = PAGE_SIZE;
sys_info.dw_number_of_processors = 1;
- if (DSP_SUCCEEDED(status)) {
- cmm_obj->dw_page_size = sys_info.dw_page_size;
- } else {
- cmm_obj->dw_page_size = 0;
- status = -EPERM;
- }
+
+ cmm_obj->dw_page_size = sys_info.dw_page_size;
+
/* Note: DSP SM seg table(aDSPSMSegTab[]) zero'd by
* MEM_ALLOC_OBJECT */
- if (DSP_SUCCEEDED(status)) {
- /* create node free list */
- cmm_obj->node_free_list_head =
- kzalloc(sizeof(struct lst_list),
- GFP_KERNEL);
- if (cmm_obj->node_free_list_head == NULL)
- status = -ENOMEM;
- else
- INIT_LIST_HEAD(&cmm_obj->
- node_free_list_head->head);
- }
- if (DSP_SUCCEEDED(status))
- mutex_init(&cmm_obj->cmm_lock);
- if (DSP_SUCCEEDED(status))
- *ph_cmm_mgr = cmm_obj;
- else
+ /* create node free list */
+ cmm_obj->node_free_list_head =
+ kzalloc(sizeof(struct lst_list),
+ GFP_KERNEL);
+ if (cmm_obj->node_free_list_head == NULL) {
+ status = -ENOMEM;
cmm_destroy(cmm_obj, true);
-
+ } else {
+ INIT_LIST_HEAD(&cmm_obj->
+ node_free_list_head->head);
+ mutex_init(&cmm_obj->cmm_lock);
+ *ph_cmm_mgr = cmm_obj;
+ }
} else {
status = -ENOMEM;
}
if (!force) {
/* Check for outstanding memory allocations */
status = cmm_get_info(hcmm_mgr, &temp_info);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
if (temp_info.ul_total_in_use_cnt > 0) {
/* outstanding allocations */
status = -EPERM;
}
}
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* UnRegister SM allocator */
for (slot_seg = 0; slot_seg < CMM_MAXGPPSEGS; slot_seg++) {
if (cmm_mgr_obj->pa_gppsm_seg_tab[slot_seg] != NULL) {
kfree(cmm_mgr_obj->node_free_list_head);
}
mutex_unlock(&cmm_mgr_obj->cmm_lock);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* delete CS & cmm mgr object */
mutex_destroy(&cmm_mgr_obj->cmm_lock);
kfree(cmm_mgr_obj);
else
hdev_obj = dev_get_first(); /* default */
- if (DSP_SUCCEEDED(status))
+ if (!status)
status = dev_get_cmm_mgr(hdev_obj, ph_cmm_mgr);
return status;
goto func_end;
}
/* Check if input ul_size is big enough to alloc at least one block */
- if (DSP_SUCCEEDED(status)) {
- if (ul_size < cmm_mgr_obj->ul_min_block_size) {
- status = -EINVAL;
- goto func_end;
- }
- }
- if (DSP_SUCCEEDED(status)) {
- /* create, zero, and tag an SM allocator object */
- psma = kzalloc(sizeof(struct cmm_allocator), GFP_KERNEL);
+ if (ul_size < cmm_mgr_obj->ul_min_block_size) {
+ status = -EINVAL;
+ goto func_end;
}
+
+ /* create, zero, and tag an SM allocator object */
+ psma = kzalloc(sizeof(struct cmm_allocator), GFP_KERNEL);
if (psma != NULL) {
psma->hcmm_mgr = hcmm_mgr; /* ref to parent */
psma->shm_base = dw_gpp_base_pa; /* SM Base phys */
status = -EPERM;
goto func_end;
}
- if (DSP_SUCCEEDED(status)) {
- /* return the actual segment identifier */
- *sgmt_id = (u32) slot_seg + 1;
- /* create memory free list */
- psma->free_list_head = kzalloc(sizeof(struct lst_list),
- GFP_KERNEL);
- if (psma->free_list_head == NULL) {
- status = -ENOMEM;
- goto func_end;
- }
- INIT_LIST_HEAD(&psma->free_list_head->head);
- }
- if (DSP_SUCCEEDED(status)) {
- /* create memory in-use list */
- psma->in_use_list_head = kzalloc(sizeof(struct
- lst_list), GFP_KERNEL);
- if (psma->in_use_list_head == NULL) {
- status = -ENOMEM;
- goto func_end;
- }
- INIT_LIST_HEAD(&psma->in_use_list_head->head);
+ /* return the actual segment identifier */
+ *sgmt_id = (u32) slot_seg + 1;
+ /* create memory free list */
+ psma->free_list_head = kzalloc(sizeof(struct lst_list),
+ GFP_KERNEL);
+ if (psma->free_list_head == NULL) {
+ status = -ENOMEM;
+ goto func_end;
}
- if (DSP_SUCCEEDED(status)) {
- /* Get a mem node for this hunk-o-memory */
- new_node = get_node(cmm_mgr_obj, dw_gpp_base_pa,
- psma->dw_vm_base, ul_size);
- /* Place node on the SM allocator's free list */
- if (new_node) {
- lst_put_tail(psma->free_list_head,
- (struct list_head *)new_node);
- } else {
- status = -ENOMEM;
- goto func_end;
- }
+ INIT_LIST_HEAD(&psma->free_list_head->head);
+
+ /* create memory in-use list */
+ psma->in_use_list_head = kzalloc(sizeof(struct
+ lst_list), GFP_KERNEL);
+ if (psma->in_use_list_head == NULL) {
+ status = -ENOMEM;
+ goto func_end;
}
- if (DSP_FAILED(status)) {
- /* Cleanup allocator */
- un_register_gppsm_seg(psma);
+ INIT_LIST_HEAD(&psma->in_use_list_head->head);
+
+ /* Get a mem node for this hunk-o-memory */
+ new_node = get_node(cmm_mgr_obj, dw_gpp_base_pa,
+ psma->dw_vm_base, ul_size);
+ /* Place node on the SM allocator's free list */
+ if (new_node) {
+ lst_put_tail(psma->free_list_head,
+ (struct list_head *)new_node);
+ } else {
+ status = -ENOMEM;
+ goto func_end;
}
} else {
status = -ENOMEM;
goto func_end;
}
/* make entry */
- if (DSP_SUCCEEDED(status))
- cmm_mgr_obj->pa_gppsm_seg_tab[slot_seg] = psma;
+ cmm_mgr_obj->pa_gppsm_seg_tab[slot_seg] = psma;
func_end:
+ if (status && psma) {
+ /* Cleanup allocator */
+ un_register_gppsm_seg(psma);
+ }
+
mutex_unlock(&cmm_mgr_obj->cmm_lock);
return status;
}
} else {
status = -ENOMEM;
}
- if (DSP_SUCCEEDED(status))
+ if (!status)
*xlator = (struct cmm_xlatorobject *)xlator_object;
return status;
status = -ESPIPE;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*len == 0)));
+ DBC_ENSURE(!status || ((*addr == 0) && (*len == 0)));
return status;
}
if (DSP_FAILED(status))
cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);
- if (DSP_SUCCEEDED(status))
+ if (!status)
cod_mgr_obj->loaded = true;
else
cod_mgr_obj->base_lib = NULL;
if (lib == NULL)
status = -ENOMEM;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
lib->cod_mgr = hmgr;
status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags,
&lib->dbll_lib);
- if (DSP_SUCCEEDED(status))
+ if (!status)
*lib_obj = lib;
}
hmgr->base_lib = NULL;
}
status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags, &lib);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* hang onto the library for subsequent sym table usage */
hmgr->base_lib = lib;
strncpy(hmgr->sz_zl_file, sz_coff_path, COD_MAXPATHLENGTH - 1);
pzl_target->attrs = *pattrs;
*target_obj = (struct dbll_tar_obj *)pzl_target;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *target_obj) ||
+ DBC_ENSURE((!status && *target_obj) ||
(DSP_FAILED(status) && *target_obj == NULL));
}
if (zl_lib != NULL) {
if (zl_lib->fp == NULL) {
status = dof_open(zl_lib);
- if (DSP_SUCCEEDED(status))
+ if (!status)
opened_doff = true;
} else {
} else {
status = -EFAULT;
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
byte_size = 1;
if (dload_get_section_info(zl_lib->desc, name, §)) {
*paddr = sect->load_addr;
/* If COFF file is not open, we open it. */
if (zl_lib->fp == NULL) {
status = dof_open(zl_lib);
- if (DSP_SUCCEEDED(status))
+ if (!status)
opened_doff = true;
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
zl_lib->ul_pos = (*(zl_lib->target_obj->attrs.ftell))
(zl_lib->fp);
/* Reset file cursor */
}
}
}
- if (DSP_SUCCEEDED(status))
+ if (!status)
zl_lib->load_ref++;
/* Clean up DOFF resources */
zl_lib->init.dl_init.execute = execute;
zl_lib->init.dl_init.release = release;
zl_lib->init.lib = zl_lib;
- if (DSP_SUCCEEDED(status) && zl_lib->fp == NULL)
+ if (!status && zl_lib->fp == NULL)
status = dof_open(zl_lib);
zl_lib->ul_pos = (*(zl_lib->target_obj->attrs.ftell)) (zl_lib->fp);
}
}
func_cont:
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
if (zl_lib->open_ref == 1) {
/* First time opened - insert in list */
if (zl_target->head)
dbll_close((struct dbll_library_obj *)zl_lib);
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && (zl_lib->open_ref > 0) && *lib_obj)
+ DBC_ENSURE((!status && (zl_lib->open_ref > 0) && *lib_obj)
|| (DSP_FAILED(status) && *lib_obj == NULL));
dev_dbg(bridge, "%s: target: %p file: %s lib_obj: %p, status 0x%x\n",
if (zl_lib != NULL) {
if (zl_lib->fp == NULL) {
status = dof_open(zl_lib);
- if (DSP_SUCCEEDED(status))
+ if (!status)
opened_doff = true;
} else {
/* Special case of getting the address only */
if (ul_num_bytes == 0)
ul_num_bytes = 1;
- if (DSP_SUCCEEDED(status))
+ if (!status)
ul_written = ul_num_bytes;
}
}
/* Create the device object, and pass a handle to the Bridge driver for
* storage. */
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
DBC_ASSERT(drv_fxns);
dev_obj = kzalloc(sizeof(struct dev_object), GFP_KERNEL);
if (dev_obj) {
}
}
/* Attempt to create the COD manager for this device: */
- if (DSP_SUCCEEDED(status))
+ if (!status)
status = init_cod_mgr(dev_obj);
/* Attempt to create the channel manager for this device: */
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
mgr_attrs.max_channels = CHNL_MAXCHANNELS;
io_mgr_attrs.birq = host_res->birq_registers;
io_mgr_attrs.irq_shared =
status = cmm_create(&dev_obj->hcmm_mgr,
(struct dev_object *)dev_obj, NULL);
/* Only create IO manager if we have a channel manager */
- if (DSP_SUCCEEDED(status) && dev_obj->hchnl_mgr) {
+ if (!status && dev_obj->hchnl_mgr) {
status = io_create(&dev_obj->hio_mgr, dev_obj,
&io_mgr_attrs);
}
/* Only create DEH manager if we have an IO manager */
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Instantiate the DEH module */
status = bridge_deh_create(&dev_obj->hdeh_mgr, dev_obj);
}
(struct dev_object *)dev_obj, NULL);
}
/* Add the new DEV_Object to the global list: */
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
lst_init_elem(&dev_obj->link);
status = drv_insert_dev_object(hdrv_obj, dev_obj);
}
/* Create the Processor List */
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
dev_obj->proc_list = kzalloc(sizeof(struct lst_list),
GFP_KERNEL);
if (!(dev_obj->proc_list))
}
leave:
/* If all went well, return a handle to the dev object;
- * else, cleanup and return NULL in the parameter. */
- if (DSP_SUCCEEDED(status)) {
+ * else, cleanup and return NULL in the OUT parameter. */
+ if (!status) {
*device_obj = dev_obj;
} else {
if (dev_obj) {
*device_obj = NULL;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *device_obj) ||
+ DBC_ENSURE((!status && *device_obj) ||
(DSP_FAILED(status) && !*device_obj));
return status;
}
if (DSP_FAILED(status))
dev_obj->hnode_mgr = NULL;
- DBC_ENSURE((DSP_SUCCEEDED(status) && dev_obj->hnode_mgr != NULL)
+ DBC_ENSURE((!status && dev_obj->hnode_mgr != NULL)
|| (DSP_FAILED(status) && dev_obj->hnode_mgr == NULL));
return status;
}
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && dev_obj->hnode_mgr == NULL) ||
+ DBC_ENSURE((!status && dev_obj->hnode_mgr == NULL) ||
DSP_FAILED(status));
return status;
}
dev_obj->hbridge_context = NULL;
} else
status = -EPERM;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
kfree(dev_obj->proc_list);
dev_obj->proc_list = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
- (*mgr == NULL)));
+ DBC_ENSURE(!status || (mgr != NULL && *mgr == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
- (*mgr == NULL)));
+ DBC_ENSURE(!status || (mgr != NULL && *mgr == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
- (*mgr == NULL)));
+ DBC_ENSURE(!status || (mgr != NULL && *mgr == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((cod_mgr != NULL) &&
- (*cod_mgr == NULL)));
+ DBC_ENSURE(!status || (cod_mgr != NULL && *cod_mgr == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((dev_nde != NULL) &&
- (*dev_nde == NULL)));
+ DBC_ENSURE(!status || (dev_nde != NULL && *dev_nde == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((if_fxns != NULL) &&
- (*if_fxns == NULL)));
+ DBC_ENSURE(!status || ((if_fxns != NULL) && (*if_fxns == NULL)));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((node_man != NULL) &&
- (*node_man == NULL)));
+ DBC_ENSURE(!status || (node_man != NULL && *node_man == NULL));
return status;
}
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phbridge_context != NULL) &&
+ DBC_ENSURE(!status || ((phbridge_context != NULL) &&
(*phbridge_context == NULL)));
return status;
}
/* Retrieve the device object handle originaly stored with
* the dev_node: */
status = cfg_get_dev_object(dev_node_obj, (u32 *) &hdev_obj);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Remove the Processor List */
dev_obj = (struct dev_object *)hdev_obj;
/* Destroy the device object. */
/* Given all resources, create a device object. */
status = dev_create_device(&hdev_obj, bridge_file_name,
dev_node_obj);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Store away the hdev_obj with the DEVNODE */
status = cfg_set_dev_object(dev_node_obj, (u32) hdev_obj);
if (DSP_FAILED(status)) {
hdev_obj = NULL;
}
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Create the Manager Object */
status = mgr_create(&hmgr_obj, dev_node_obj);
}
/* Add DevObject to tail. */
lst_put_tail(dev_obj->proc_list, (struct list_head *)proc_obj);
- DBC_ENSURE(DSP_SUCCEEDED(status) && !LST_IS_EMPTY(dev_obj->proc_list));
+ DBC_ENSURE(!status && !LST_IS_EMPTY(dev_obj->proc_list));
return status;
}
int status = 0;
status = dmm_delete_tables(dmm_obj);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
dyn_mem_map_beg = addr;
table_size = PG_ALIGN_HIGH(size, PG_SIZE4K) / PG_SIZE4K;
/* Create the free list */
DBC_REQUIRE(refs > 0);
if (dmm_mgr) {
status = dmm_delete_tables(dmm_obj);
- if (DSP_SUCCEEDED(status))
+ if (!status)
kfree(dmm_obj);
} else
status = -EFAULT;
else
hdev_obj = dev_get_first(); /* default */
- if (DSP_SUCCEEDED(status))
+ if (!status)
status = dev_get_dmm_mgr(hdev_obj, dmm_manager);
return status;
if (chunk == NULL)
status = -ENOENT;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Unmap the region */
*psize = chunk->mapped_size * PG_SIZE4K;
chunk->mapped = false;
if (chunk == NULL)
status = -ENOENT;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Free all the mapped pages for this reserved region */
i = 0;
while (i < chunk->region_size) {
if (pndb_props == NULL)
status = -ENOMEM;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status =
mgr_enum_node_info(args->args_mgr_enumnode_info.node_id,
(struct dsp_ndbprops *)pndb_props, size,
if (processor_info == NULL)
status = -ENOMEM;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status =
mgr_enum_processor_info(args->args_mgr_enumproc_info.
processor_id,
/* get the events */
for (i = 0; i < count; i++) {
CP_FM_USR(¬ifications[i], anotifications[i], status, 1);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* set the array of pointers to kernel structures */
anotifications[i] = ¬ifications[i];
}
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
real_status = mgr_wait_for_bridge_events(anotifications, count,
&index,
args->args_mgr_wait.
if (args->args_proc_attach.attr_in) {
CP_FM_USR(&proc_attr_in, args->args_proc_attach.attr_in, status,
1);
- if (DSP_SUCCEEDED(status))
+ if (!status)
attr_in = &proc_attr_in;
else
goto func_end;
CP_FM_USR(pargs, args->args_proc_ctrl.pargs, status,
cb_data_size);
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = proc_ctrl(args->args_proc_ctrl.hprocessor,
args->args_proc_ctrl.dw_cmd,
(struct dsp_cbdata *)pargs);
}
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = proc_load(args->args_proc_load.hprocessor,
args->args_proc_load.argc_index,
(const char **)argv, (const char **)envp);
args->args_proc_mapmem.ul_size,
args->args_proc_mapmem.req_addr, &map_addr,
args->args_proc_mapmem.ul_map_attr, pr_ctxt);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
if (put_user(map_addr, args->args_proc_mapmem.pp_map_addr)) {
status = -EINVAL;
proc_un_map(args->args_proc_mapmem.hprocessor,
status = proc_reserve_memory(args->args_proc_rsvmem.hprocessor,
args->args_proc_rsvmem.ul_size, &prsv_addr,
pr_ctxt);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
if (put_user(prsv_addr, args->args_proc_rsvmem.pp_rsv_addr)) {
status = -EINVAL;
proc_un_reserve_memory(args->args_proc_rsvmem.
status = -EPERM;
cb_data_size += sizeof(u32);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
pargs = kmalloc(cb_data_size, GFP_KERNEL);
if (pargs == NULL)
status = -ENOMEM;
if (args->args_node_allocate.attr_in) {
CP_FM_USR(&proc_attr_in, args->args_node_allocate.attr_in,
status, 1);
- if (DSP_SUCCEEDED(status))
+ if (!status)
attr_in = &proc_attr_in;
else
status = -ENOMEM;
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = node_allocate(args->args_node_allocate.hprocessor,
&node_uuid, (struct dsp_cbdata *)pargs,
attr_in, &hnode, pr_ctxt);
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
CP_TO_USR(args->args_node_allocate.ph_node, &hnode, status, 1);
if (DSP_FAILED(status)) {
status = -EFAULT;
if (args->args_node_allocmsgbuf.pattr) { /* Optional argument */
CP_FM_USR(&attr, args->args_node_allocmsgbuf.pattr, status, 1);
- if (DSP_SUCCEEDED(status))
+ if (!status)
pattr = &attr;
}
/* argument */
CP_FM_USR(&pbuffer, args->args_node_allocmsgbuf.pbuffer, status, 1);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = node_alloc_msg_buf(args->args_node_allocmsgbuf.hnode,
args->args_node_allocmsgbuf.usize,
pattr, &pbuffer);
status = -EPERM;
cb_data_size += sizeof(u32);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
pargs = kmalloc(cb_data_size, GFP_KERNEL);
if (pargs == NULL) {
status = -ENOMEM;
}
if (args->args_node_connect.pattrs) { /* Optional argument */
CP_FM_USR(&attrs, args->args_node_connect.pattrs, status, 1);
- if (DSP_SUCCEEDED(status))
+ if (!status)
pattrs = &attrs;
}
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = node_connect(args->args_node_connect.hnode,
args->args_node_connect.stream_id,
args->args_node_connect.other_node,
struct dsp_bufferattr attr;
if (args->args_node_freemsgbuf.pattr) { /* Optional argument */
CP_FM_USR(&attr, args->args_node_freemsgbuf.pattr, status, 1);
- if (DSP_SUCCEEDED(status))
+ if (!status)
pattr = &attr;
}
if (!args->args_node_freemsgbuf.pbuffer)
return -EFAULT;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = node_free_msg_buf(args->args_node_freemsgbuf.hnode,
args->args_node_freemsgbuf.pbuffer,
pattr);
CP_FM_USR(&msg, args->args_node_putmessage.message, status, 1);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status =
node_put_message(args->args_node_putmessage.hnode, &msg,
args->args_node_putmessage.utimeout);
status = strm_allocate_buffer(args->args_strm_allocatebuffer.hstream,
args->args_strm_allocatebuffer.usize,
ap_buffer, num_bufs, pr_ctxt);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
CP_TO_USR(args->args_strm_allocatebuffer.ap_buffer, ap_buffer,
status, num_bufs);
if (DSP_FAILED(status)) {
CP_FM_USR(ap_buffer, args->args_strm_freebuffer.ap_buffer, status,
num_bufs);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = strm_free_buffer(args->args_strm_freebuffer.hstream,
ap_buffer, num_bufs, pr_ctxt);
}
strm_info.user_strm = &user;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = strm_get_info(args->args_strm_getinfo.hstream,
&strm_info,
args->args_strm_getinfo.
if (attr.stream_attr_in != NULL) { /* Optional argument */
CP_FM_USR(&strm_attr_in, attr.stream_attr_in, status, 1);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
attr.stream_attr_in = &strm_attr_in;
if (attr.stream_attr_in->strm_mode == STRMMODE_LDMA)
return -ENOSYS;
CP_FM_USR(strm_tab, args->args_strm_select.stream_tab, status,
args->args_strm_select.strm_num);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
status = strm_select(strm_tab, args->args_strm_select.strm_num,
&mask, args->args_strm_select.utimeout);
}
if (mgr_attrts->word_size == 0)
status = -EINVAL;
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
dev_get_intf_fxns(hdev_obj, &intf_fxns);
/* Let Bridge channel module finish the create: */
status = (*intf_fxns->pfn_io_create) (&hio_mgr, hdev_obj,
mgr_attrts);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
pio_mgr = (struct io_mgr_ *)hio_mgr;
pio_mgr->intf_fxns = intf_fxns;
pio_mgr->hdev_obj = hdev_obj;
status =
(*intf_fxns->pfn_msg_create) (&hmsg_mgr, hdev_obj, msg_callback);
- if (DSP_SUCCEEDED(status)) {
+ if (!status) {
/* Fill in DSP API message module's fields of the msg_mgr
* structure */
msg_mgr_obj = (struct msg_mgr_ *)hmsg_mgr;