mirror of https://github.com/thesofproject/sof.git
IPC: IPC4: Fix return value handling in two helper.c functions
This patch changes function ipc4_create_chain_dma() to check return value against IPC_SUCCESS. If not successful return the return value. The function ipc4_add_comp_dev() is changed to return value IPC4_SUCCESS instead of zero since the other return value in function is IPC4 style. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
6c48d42f80
commit
b7d958bad9
|
@ -581,8 +581,8 @@ int ipc4_create_chain_dma(struct ipc *ipc, struct ipc4_chain_dma *cdma)
|
|||
host->period = ipc_pipe->pipeline->period;
|
||||
|
||||
ret = ipc4_add_comp_dev(host);
|
||||
if (ret < 0)
|
||||
return IPC4_FAILURE;
|
||||
if (ret != IPC4_SUCCESS)
|
||||
return ret;
|
||||
|
||||
memset_s(¶ms, sizeof(params), 0, sizeof(params));
|
||||
memset_s(&copier_cfg, sizeof(copier_cfg), 0, sizeof(copier_cfg));
|
||||
|
@ -603,8 +603,8 @@ int ipc4_create_chain_dma(struct ipc *ipc, struct ipc4_chain_dma *cdma)
|
|||
dai->period = ipc_pipe->pipeline->period;
|
||||
|
||||
ret = ipc4_add_comp_dev(dai);
|
||||
if (ret < 0)
|
||||
return IPC4_FAILURE;
|
||||
if (ret != IPC4_SUCCESS)
|
||||
return ret;
|
||||
|
||||
buf_id = dai_id + 1;
|
||||
if (dir == SOF_IPC_STREAM_PLAYBACK) {
|
||||
|
@ -825,5 +825,5 @@ int ipc4_add_comp_dev(struct comp_dev *dev)
|
|||
/* add new component to the list */
|
||||
list_item_append(&icd->list, &ipc->comp_list);
|
||||
|
||||
return 0;
|
||||
return IPC4_SUCCESS;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue