aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hdata/iohub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hdata/iohub.c b/hdata/iohub.c
index ad1ddae..028fc6a 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -660,6 +660,10 @@ static void parse_one_slot(const struct slot_map_entry *entry,
case st_rc_slot:
node = dt_new_2addr(dt_slots, "root-complex",
chip_id, entry->phb_index);
+ if (!node) {
+ SM_ERR("Couldn't add DT node\n");
+ return;
+ }
dt_add_property_cells(node, "reg", chip_id, entry->phb_index);
dt_add_property_cells(node, "#address-cells", 2);
dt_add_property_cells(node, "#size-cells", 0);