diff options
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 742ef88ffd7b..5cefcadd3562 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -562,13 +562,15 @@ int dlpar_memory(struct pseries_hp_errorlog *hp_elog) | |||
562 | lock_device_hotplug(); | 562 | lock_device_hotplug(); |
563 | 563 | ||
564 | dn = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); | 564 | dn = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); |
565 | if (!dn) | 565 | if (!dn) { |
566 | return -EINVAL; | 566 | rc = -EINVAL; |
567 | goto dlpar_memory_out; | ||
568 | } | ||
567 | 569 | ||
568 | prop = dlpar_clone_drconf_property(dn); | 570 | prop = dlpar_clone_drconf_property(dn); |
569 | if (!prop) { | 571 | if (!prop) { |
570 | of_node_put(dn); | 572 | rc = -EINVAL; |
571 | return -EINVAL; | 573 | goto dlpar_memory_out; |
572 | } | 574 | } |
573 | 575 | ||
574 | switch (hp_elog->action) { | 576 | switch (hp_elog->action) { |
@@ -599,6 +601,7 @@ int dlpar_memory(struct pseries_hp_errorlog *hp_elog) | |||
599 | else | 601 | else |
600 | dlpar_update_drconf_property(dn, prop); | 602 | dlpar_update_drconf_property(dn, prop); |
601 | 603 | ||
604 | dlpar_memory_out: | ||
602 | of_node_put(dn); | 605 | of_node_put(dn); |
603 | unlock_device_hotplug(); | 606 | unlock_device_hotplug(); |
604 | return rc; | 607 | return rc; |