powerpc: pcibios_enable_device_hook: return bool rather than int
pcibios_enable_device_hook returned an int. Every implementation returned either -EINVAL or 0. The return value wasn't propagated by the caller: any non-zero return value caused pcibios_enable_device to return -EINVAL itself. Therefore, make the hook return a bool. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
ba9c8f2273
commit
c88c2a1889
@@ -1451,7 +1451,7 @@ EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus);
|
||||
int pcibios_enable_device(struct pci_dev *dev, int mask)
|
||||
{
|
||||
if (ppc_md.pcibios_enable_device_hook)
|
||||
if (ppc_md.pcibios_enable_device_hook(dev))
|
||||
if (!ppc_md.pcibios_enable_device_hook(dev))
|
||||
return -EINVAL;
|
||||
|
||||
return pci_enable_resources(dev, mask);
|
||||
|
Reference in New Issue
Block a user