hw/slw: use dt_new_check()
On P9 systems the /ibm,opal/power-mgt/ node may be created by the HDAT
parser before reaching add_cpu_idle_state_properties(). This is fine,
but it needs to be handled.
@@ -648,11 +648,10 @@ void add_cpu_idle_state_properties(void)
u32 *residency_ns_buf;
u32 *flags_buf;
-
prlog(PR_DEBUG, "CPU idle state device tree init\n");
- /* Create /ibm,opal/power-mgt */
- power_mgt = dt_new(opal_node, "power-mgt");
+ /* Create /ibm,opal/power-mgt if it doesn't exist already */
+ power_mgt = dt_new_check(opal_node, "power-mgt");
if (!power_mgt) {
/**
* @fwts-label CreateDTPowerMgtNodeFail
