diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2015-03-12 16:07:04 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-03-19 11:17:22 -0400 |
| commit | 9e808eb6a7689b61399f772a2576d779161769ec (patch) | |
| tree | 73af8c5605ba91394b1fffdc964a03741b4897c4 /arch/sparc | |
| parent | a0c8a4d9f92d1ecd053eaa0e6cde7b4f24af97a8 (diff) | |
PCI: Cleanup control flow
Return errors immediately so the straightline path is the normal,
no-error path. No functional change.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/sparc')
| -rw-r--r-- | arch/sparc/kernel/leon_pci.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c index 297107679fdf..4371f72ff025 100644 --- a/arch/sparc/kernel/leon_pci.c +++ b/arch/sparc/kernel/leon_pci.c | |||
| @@ -34,16 +34,17 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info) | |||
| 34 | 34 | ||
| 35 | root_bus = pci_scan_root_bus(&ofdev->dev, 0, info->ops, info, | 35 | root_bus = pci_scan_root_bus(&ofdev->dev, 0, info->ops, info, |
| 36 | &resources); | 36 | &resources); |
| 37 | if (root_bus) { | 37 | if (!root_bus) { |
| 38 | /* Setup IRQs of all devices using custom routines */ | ||
| 39 | pci_fixup_irqs(pci_common_swizzle, info->map_irq); | ||
| 40 | |||
| 41 | /* Assign devices with resources */ | ||
| 42 | pci_assign_unassigned_resources(); | ||
| 43 | pci_bus_add_devices(root_bus); | ||
| 44 | } else { | ||
| 45 | pci_free_resource_list(&resources); | 38 | pci_free_resource_list(&resources); |
| 39 | return; | ||
| 46 | } | 40 | } |
| 41 | |||
| 42 | /* Setup IRQs of all devices using custom routines */ | ||
| 43 | pci_fixup_irqs(pci_common_swizzle, info->map_irq); | ||
| 44 | |||
| 45 | /* Assign devices with resources */ | ||
| 46 | pci_assign_unassigned_resources(); | ||
| 47 | pci_bus_add_devices(root_bus); | ||
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | void pcibios_fixup_bus(struct pci_bus *pbus) | 50 | void pcibios_fixup_bus(struct pci_bus *pbus) |
