diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2018-03-19 15:54:16 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-03-27 14:51:38 +1100 |
commit | 7598ed90a6706158cce34596a33ededbb47af393 (patch) | |
tree | 960e964be1dbad4d10ddafa1d41073dba4bd15a5 /hw/occ.c | |
parent | 3c3b809cb8ba8c440353a0f0849f8c37e5f1ca1d (diff) | |
download | skiboot-7598ed90a6706158cce34596a33ededbb47af393.zip skiboot-7598ed90a6706158cce34596a33ededbb47af393.tar.gz skiboot-7598ed90a6706158cce34596a33ededbb47af393.tar.bz2 |
fast-reboot: occ: Only delete /ibm, opal/power-mgt nodes if they exist
Fixes: ac4272bf ("fast-reboot: occ: Delete OCC child nodes in /ibm, opal/power-mgt")
Fixes: CID 263053
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/occ.c')
-rw-r--r-- | hw/occ.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1696,12 +1696,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) { |