diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-11-27 18:44:49 +0530 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-12-15 13:17:23 +0530 |
commit | e12574f5cc637421ac409653532a2778615a2803 (patch) | |
tree | 12eb2272aa035ab26717e9aa5a51047c0774a817 /hdata/spira.c | |
parent | 0b34470e02a09b74f2fb3e0d1d78dad60db29b2b (diff) | |
download | skiboot-e12574f5cc637421ac409653532a2778615a2803.zip skiboot-e12574f5cc637421ac409653532a2778615a2803.tar.gz skiboot-e12574f5cc637421ac409653532a2778615a2803.tar.bz2 |
hdata: assert if we fail to add xscom nodes
If we have duplicate xscom nodes then it will fail to attach xscom
node to device tree and we will fail eventully. Better to call assert()
and fail here.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/spira.c')
-rw-r--r-- | hdata/spira.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index deb2dea..2e3b3a4 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -315,8 +315,7 @@ static struct dt_node *add_xscom_node(uint64_t base, uint32_t hw_id, hw_id, proc_chip_id, (long long)addr); node = dt_new_addr(dt_root, "xscom", addr); - if (!node) - return NULL; + assert(node); dt_add_property_cells(node, "ibm,chip-id", hw_id); dt_add_property_cells(node, "ibm,proc-chip-id", proc_chip_id); |