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/sh | |
| 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/sh')
| -rw-r--r-- | arch/sh/drivers/pci/pci.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index efc10519916a..d5462b7bc514 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
| @@ -58,21 +58,23 @@ static void pcibios_scanbus(struct pci_channel *hose) | |||
| 58 | 58 | ||
| 59 | need_domain_info = need_domain_info || hose->index; | 59 | need_domain_info = need_domain_info || hose->index; |
| 60 | hose->need_domain_info = need_domain_info; | 60 | hose->need_domain_info = need_domain_info; |
| 61 | if (bus) { | ||
| 62 | next_busno = bus->busn_res.end + 1; | ||
| 63 | /* Don't allow 8-bit bus number overflow inside the hose - | ||
| 64 | reserve some space for bridges. */ | ||
| 65 | if (next_busno > 224) { | ||
| 66 | next_busno = 0; | ||
| 67 | need_domain_info = 1; | ||
| 68 | } | ||
| 69 | 61 | ||
| 70 | pci_bus_size_bridges(bus); | 62 | if (!bus) { |
| 71 | pci_bus_assign_resources(bus); | ||
| 72 | pci_bus_add_devices(bus); | ||
| 73 | } else { | ||
| 74 | pci_free_resource_list(&resources); | 63 | pci_free_resource_list(&resources); |
| 64 | return; | ||
| 65 | } | ||
| 66 | |||
| 67 | next_busno = bus->busn_res.end + 1; | ||
| 68 | /* Don't allow 8-bit bus number overflow inside the hose - | ||
| 69 | reserve some space for bridges. */ | ||
| 70 | if (next_busno > 224) { | ||
| 71 | next_busno = 0; | ||
| 72 | need_domain_info = 1; | ||
| 75 | } | 73 | } |
| 74 | |||
| 75 | pci_bus_size_bridges(bus); | ||
| 76 | pci_bus_assign_resources(bus); | ||
| 77 | pci_bus_add_devices(bus); | ||
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | /* | 80 | /* |
