Skip to content

Commit 4810422

Browse files
lyakhlgirdwood
authored andcommitted
dp: user: fix objpool allocation error handling
When an objpool allocation fails an error should be returned. Fix the missing error code assignment. Fixes: fc73f9d ("sp: application: switch memory domains to object pools") Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 0c32c9a commit 4810422

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/schedule/zephyr_dp_schedule_application.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,11 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid,
518518
struct k_mem_domain *mdom = objpool_alloc(&dp_mdom_head, sizeof(*mdom),
519519
SOF_MEM_FLAG_COHERENT);
520520

521-
if (!mdom)
521+
if (!mdom) {
522+
tr_err(&dp_tr, "objpool allocation failed");
523+
ret = -ENOMEM;
522524
goto e_thread;
525+
}
523526

524527
mod->mdom = mdom;
525528

0 commit comments

Comments
 (0)