From e12574f5cc637421ac409653532a2778615a2803 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Fri, 27 Nov 2020 18:44:49 +0530 Subject: 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 --- hdata/spira.c | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit v1.1