[Skiboot] [PATCH 07/12] core/mem_region: Check return value of add_region() (CID 147251)
Cyril Bur
cyril.bur at au1.ibm.com
Thu Aug 3 16:45:46 AEST 2017
Just print an error if a region failed to add - at least then there will
be a trace somewhere about the problem.
Fixes: CID 147251
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
core/mem_region.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/mem_region.c b/core/mem_region.c
index a0986859..3c93cd47 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -995,7 +995,11 @@ static bool mem_region_parse_reserved_nodes(const char *path)
dt_get_number(reg->prop, 2),
dt_get_number(reg->prop + sizeof(u64), 2),
node, type);
- add_region(region);
+ if (!add_region(region)) {
+ char *nodepath = dt_get_path(node);
+ prerror("node %s failed to add_region()\n", nodepath);
+ free(nodepath);
+ }
}
return true;
--
2.13.3
More information about the Skiboot
mailing list