device_tree: Switch allocations to xzalloc()
The FIT code is already using xzalloc() everywhere, and that's the only real consumer of device tree code right now. Chances are if you're trying to unflatten an FDT and it doesn't fit into the heap you're pretty much screwed anyway, so all the OOM handling feels a bit unnecessary (and some functions will just silently fail because they don't have a return value, which is bad). Let's just switch this all to die on failed allocations. Change-Id: I738f24d550a776653b2becd3d4f7d4d2cb3cc048 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32861 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
fca7c4d614
commit
9636a106d4
@@ -27,7 +27,7 @@
|
||||
#include <fit.h>
|
||||
#include <boardid.h>
|
||||
#include <commonlib/cbfs_serialized.h>
|
||||
#include <commonlib/include/commonlib/stdlib.h>
|
||||
#include <commonlib/stdlib.h>
|
||||
|
||||
static struct list_node image_nodes;
|
||||
static struct list_node config_nodes;
|
||||
|
Reference in New Issue
Block a user