X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fmalloc_simple.c;h=d445199c58aaa3a6b06c3b102b06f23b61193855;hb=4d2d2ae559c14dee59f1b4db29181945eb98f734;hp=afdacff80d8e1fc411cba7eab59286ef28a8a1e5;hpb=8f02caac64980faa73b2bf00462b400c86257d04;p=karo-tx-uboot.git diff --git a/common/malloc_simple.c b/common/malloc_simple.c index afdacff80d..d445199c58 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -8,6 +8,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -19,7 +20,7 @@ void *malloc_simple(size_t bytes) new_ptr = gd->malloc_ptr + bytes; if (new_ptr > gd->malloc_limit) - panic("Out of pre-reloc memory"); + return NULL; ptr = map_sysmem(gd->malloc_base + gd->malloc_ptr, bytes); gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr)); return ptr;