summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/rpaphp_core.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-04-13 15:34:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 19:02:40 -0700
commit6f79eb749df7f1eea76c947f31603ade7d2b5f6d (patch)
tree05739883d619b6fc0a45d3988f65775327bb80c2 /drivers/pci/hotplug/rpaphp_core.c
parentc02929c278f2bca68635e4c2daa00b7825d71061 (diff)
PCI: rpaphp: refactor tail call to rpaphp_register_slot()
Eliminate the tail call to rpaphp_register_slot() by placing it in the caller. This will help later dis-entanglement. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/rpaphp_core.c')
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index e9c157d30e82..d8e5f9fd357d 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -319,6 +319,9 @@ int rpaphp_add_slot(struct device_node *dn)
indexes[i + 1], name, type);
retval = rpaphp_register_pci_slot(slot);
+ if (!retval)
+ retval = rpaphp_register_slot(slot);
+
if (retval)
dealloc_slot_struct(slot);