Skip to content

Commit 82d5fce

Browse files
committed
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 2ab0a00 commit 82d5fce

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
@@ -506,8 +506,11 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid,
506506
struct k_mem_domain *mdom = objpool_alloc(&dp_mdom_head, sizeof(*mdom),
507507
SOF_MEM_FLAG_COHERENT);
508508

509-
if (!mdom)
509+
if (!mdom) {
510+
tr_err(&dp_tr, "objpool allocation failed");
511+
ret = -ENOMEM;
510512
goto e_thread;
513+
}
511514

512515
mod->mdom = mdom;
513516

0 commit comments

Comments
 (0)