aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pnv_php.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/pnv_php.c')
-rw-r--r--drivers/pci/hotplug/pnv_php.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index d44100687dfe..6c2e8d7307c6 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -220,12 +220,16 @@ static int pnv_php_populate_changeset(struct of_changeset *ocs,
220 220
221 for_each_child_of_node(dn, child) { 221 for_each_child_of_node(dn, child) {
222 ret = of_changeset_attach_node(ocs, child); 222 ret = of_changeset_attach_node(ocs, child);
223 if (ret) 223 if (ret) {
224 of_node_put(child);
224 break; 225 break;
226 }
225 227
226 ret = pnv_php_populate_changeset(ocs, child); 228 ret = pnv_php_populate_changeset(ocs, child);
227 if (ret) 229 if (ret) {
230 of_node_put(child);
228 break; 231 break;
232 }
229 } 233 }
230 234
231 return ret; 235 return ret;