diff options
Diffstat (limited to 'arch/arm/mach-dove/pcie.c')
-rw-r--r-- | arch/arm/mach-dove/pcie.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 8a275f297522..91fe97144570 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -155,17 +155,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); | |||
155 | static struct pci_bus __init * | 155 | static struct pci_bus __init * |
156 | dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) | 156 | dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) |
157 | { | 157 | { |
158 | struct pci_bus *bus; | 158 | if (nr >= num_pcie_ports) { |
159 | |||
160 | if (nr < num_pcie_ports) { | ||
161 | bus = pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys, | ||
162 | &sys->resources); | ||
163 | } else { | ||
164 | bus = NULL; | ||
165 | BUG(); | 159 | BUG(); |
160 | return NULL; | ||
166 | } | 161 | } |
167 | 162 | ||
168 | return bus; | 163 | return pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys, |
164 | &sys->resources); | ||
169 | } | 165 | } |
170 | 166 | ||
171 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 167 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |