Skip to content

Commit

Permalink
PCI: rpaphp: refactor tail call to rpaphp_register_slot()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linas Vepstas authored and Greg Kroah-Hartman committed May 3, 2007
1 parent c02929c commit 6f79eb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/rpaphp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ int rpaphp_register_pci_slot(struct slot *slot)
}
}

return rpaphp_register_slot(slot);
return 0;
}

0 comments on commit 6f79eb7

Please sign in to comment.