From: Stephen Warren Date: Sat, 5 Mar 2016 17:30:53 +0000 (-0700) Subject: malloc: remove !gd handling X-Git-Tag: v2016.03~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=deff6fb3a7790e93264292982000275e78bb12e5;p=u-boot malloc: remove !gd handling Following the previous patch, malloc() is never called before gd is set, so we can remove the special-case check for this condition. This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early alloc". Cc: Rabin Vincent Signed-off-by: Stephen Warren Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 5ea37dfb6e..d66e80c647 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2184,7 +2184,7 @@ Void_t* mALLOc(bytes) size_t bytes; INTERNAL_SIZE_T nb; #ifdef CONFIG_SYS_MALLOC_F_LEN - if (gd && !(gd->flags & GD_FLG_FULL_MALLOC_INIT)) + if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) return malloc_simple(bytes); #endif