aboutsummaryrefslogtreecommitdiff
path: root/core/device.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-11-26 11:11:57 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-11-26 18:17:05 +1100
commitcf8def92617e3cc554c261ff7c740ba7e76261af (patch)
tree94c7d55cb6487df89047c7ecfcec5834a0c0eee1 /core/device.c
parent093b264a977d5426c3507d5bdaf1196c4607b0d5 (diff)
downloadskiboot-cf8def92617e3cc554c261ff7c740ba7e76261af.zip
skiboot-cf8def92617e3cc554c261ff7c740ba7e76261af.tar.gz
skiboot-cf8def92617e3cc554c261ff7c740ba7e76261af.tar.bz2
abort if device tree parsing fails
I debugged a checkstop with a BML boot which turned out to be device tree issues. A corrupt device tree is very likely to result in a later checkstop, so abort in dt_expand to make debugging much easier. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/device.c')
-rw-r--r--core/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/device.c b/core/device.c
index 28cccb7..ffc38f8 100644
--- a/core/device.c
+++ b/core/device.c
@@ -691,7 +691,8 @@ void dt_expand(const void *fdt)
dt_root = dt_new_root("");
- dt_expand_node(dt_root, fdt, 0);
+ if (dt_expand_node(dt_root, fdt, 0) < 0)
+ abort();
}
u64 dt_get_number(const void *pdata, unsigned int cells)