Skip to content

Commit

Permalink
ipc4: helper: fix checks in comp dir update
Browse files Browse the repository at this point in the history
- list_is_empty is required to properly check source list
- at this stage empty list is allowed since source bind might not
happen yet

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
  • Loading branch information
abonislawski committed Mar 18, 2024
1 parent dff7332 commit 374ad8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ipc/ipc4/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,11 @@ static int ipc4_update_comps_direction(struct ipc *ipc, uint32_t ppl_id)
if (icd->cd->direction_set)
continue;

if (list_is_empty(&icd->cd->bsource_list))
continue;

src_buf = list_first_item(&icd->cd->bsource_list, struct comp_buffer, sink_list);
if (src_buf && src_buf->source->direction_set) {
if (src_buf->source->direction_set) {
icd->cd->direction = src_buf->source->direction;
icd->cd->direction_set = true;
continue;
Expand Down

0 comments on commit 374ad8c

Please sign in to comment.