malloc: Fix memalign not honoring alignment prior to full malloc init
authorAndreas Dannenberg <dannenberg@ti.com>
Wed, 27 Mar 2019 18:17:26 +0000 (13:17 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 23 Apr 2019 21:57:27 +0000 (17:57 -0400)
When using memalign() in a scenario where U-Boot is configured for full
malloc support with simple malloc not explicitly enabled and before the
full malloc support is initialized, a memory block is being allocated
and returned without the alignment parameter getting honored.

Fix this issue by replacing the existing memalign pre-full malloc init
logic with a call to memalign_simple() this way ensuring proper alignment
of the returned memory block.

Fixes: ee038c58d519 ("malloc: Use malloc simple before malloc is fully initialized in memalign()")
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

No differences found