Commit 6f79eb74 authored by Linas Vepstas's avatar Linas Vepstas Committed by Greg Kroah-Hartman

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: default avatarLinas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c02929c2
...@@ -319,6 +319,9 @@ int rpaphp_add_slot(struct device_node *dn) ...@@ -319,6 +319,9 @@ int rpaphp_add_slot(struct device_node *dn)
indexes[i + 1], name, type); indexes[i + 1], name, type);
retval = rpaphp_register_pci_slot(slot); retval = rpaphp_register_pci_slot(slot);
if (!retval)
retval = rpaphp_register_slot(slot);
if (retval) if (retval)
dealloc_slot_struct(slot); dealloc_slot_struct(slot);
......
...@@ -136,6 +136,6 @@ int rpaphp_register_pci_slot(struct slot *slot) ...@@ -136,6 +136,6 @@ int rpaphp_register_pci_slot(struct slot *slot)
} }
} }
return rpaphp_register_slot(slot); return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment