diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-03 17:36:43 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-04 11:22:25 +0000 |
commit | 9636a106d43453976addb39253cf70bc65ea1224 (patch) | |
tree | 2437accef66f0fce9487fca8122b14789d94a3f5 /src/lib/fit.c | |
parent | fca7c4d614eeee1b040cfeba37599b32d0ad55f1 (diff) | |
download | coreboot-9636a106d43453976addb39253cf70bc65ea1224.tar.xz |
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>
Diffstat (limited to 'src/lib/fit.c')
-rw-r--r-- | src/lib/fit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/fit.c b/src/lib/fit.c index 3aad806f2e..d15641db9a 100644 --- a/src/lib/fit.c +++ b/src/lib/fit.c @@ -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; |