Skip to content

Commit fa3d354

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. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent ac1a0de commit fa3d354

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/schedule/zephyr_dp_schedule_application.c

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

483-
if (!mdom)
483+
if (!mdom) {
484+
tr_err(&dp_tr, "objpool allocation failed");
485+
ret = -ENOMEM;
484486
goto e_thread;
487+
}
485488

486489
mod->mdom = mdom;
487490

0 commit comments

Comments
 (0)