fast-reboot: occ: Only delete /ibm, opal/power-mgt nodes if they exist
Fixes: ("fast-reboot: occ: Delete OCC child nodes in /ibm, opal/power-mgt")
Fixes: CID 263053
@@ -1696,6 +1696,7 @@ void occ_pstates_init(void)
};
power_mgt = dt_find_by_path(dt_root, "/ibm,opal/power-mgt");
+ if (power_mgt) {
for (i = 0; i < ARRAY_SIZE(props); i++)
dt_check_del_prop(power_mgt, props[i]);
@@ -1703,6 +1704,7 @@ void occ_pstates_init(void)
if (!strncmp(child->name, "occ", 3))
dt_free(child);
}
+ }
switch (proc_gen) {
case proc_gen_p8:
