mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
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>
This commit is contained in:
parent
c02929c278
commit
6f79eb749d
@ -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);
|
||||
|
||||
|
@ -136,6 +136,6 @@ int rpaphp_register_pci_slot(struct slot *slot)
|
||||
}
|
||||
}
|
||||
|
||||
return rpaphp_register_slot(slot);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user