From f2c742531ca45a7f4f1eba5bb7e2b7f3f28347e6 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Fri, 31 Oct 2025 12:17:50 +0200 Subject: [PATCH] zephyr: lib/alloc: Relax virtual_heap_alloc() assert condition Relax virtual_heap_alloc() assert condition so that it allows zero alignment for the case where no particular alignment is requested. Signed-off-by: Jyri Sarha --- zephyr/lib/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index 475fa09374a4..ef454d2006c7 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -286,7 +286,7 @@ static void *virtual_heap_alloc(struct vmh_heap *heap, uint32_t flags, size_t by if (!mem) return NULL; - assert(IS_ALIGNED(mem, align)); + assert(align == 0 || IS_ALIGNED(mem, align)); if (flags & SOF_MEM_FLAG_COHERENT) return sys_cache_uncached_ptr_get((__sparse_force void __sparse_cache *)mem);