lib: alloc: k_panic is not required in failure case

For rballoc_allign() call when caps are not correct it is
enough to return error. k_panic() call is not required here.
Previous change exposed this issue:
https://github.com/thesofproject/sof/issues/8832,
but it is sufficient to log error and return NULL at this point.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This commit is contained in:
Jaroslaw Stelter 2024-02-12 11:31:58 +01:00 committed by Liam Girdwood
parent af80acccc6
commit 438b11bab2
1 changed files with 2 additions and 1 deletions

View File

@ -388,7 +388,8 @@ void *rballoc_align(uint32_t flags, uint32_t caps, size_t bytes,
heap = &l3_heap;
return (__sparse_force void *)l3_heap_alloc_aligned(heap, align, bytes);
#else
k_panic();
tr_err(&zephyr_tr, "L3_HEAP not available.");
return NULL;
#endif
} else {
heap = &sof_heap;