[Skiboot] [PATCH 5/9] fast-reboot: occ: Only delete /ibm, opal/power-mgt nodes if they exist
Cyril Bur
cyril.bur at au1.ibm.com
Mon Mar 19 15:54:16 AEDT 2018
Fixes: ac4272bf ("fast-reboot: occ: Delete OCC child nodes in /ibm, opal/power-mgt")
Fixes: CID 263053
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
hw/occ.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/occ.c b/hw/occ.c
index 37cf73c3..85ffc2cc 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1680,12 +1680,14 @@ void occ_pstates_init(void)
};
power_mgt = dt_find_by_path(dt_root, "/ibm,opal/power-mgt");
- for (i = 0; i < ARRAY_SIZE(props); i++)
- dt_check_del_prop(power_mgt, props[i]);
+ if (power_mgt) {
+ for (i = 0; i < ARRAY_SIZE(props); i++)
+ dt_check_del_prop(power_mgt, props[i]);
- dt_for_each_child(power_mgt, child)
- if (!strncmp(child->name, "occ", 3))
- dt_free(child);
+ dt_for_each_child(power_mgt, child)
+ if (!strncmp(child->name, "occ", 3))
+ dt_free(child);
+ }
}
switch (proc_gen) {
--
2.16.2
More information about the Skiboot
mailing list