summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2013-07-26 10:17:49 -0300
committerJason Cooper <jason@lakedaemon.net>2013-08-06 14:10:41 +0000
commitb22503a9c3bd8a3512fa4daf2c6c456d12db34de (patch)
tree3db9abf96e87b842a7dc1f01c9cbc3ca4fa7d06a /drivers/pci
parent11be65472a427dcf7a11ab6e3e3628f1c6768b5b (diff)
downloadop-kernel-dev-b22503a9c3bd8a3512fa4daf2c6c456d12db34de.zip
op-kernel-dev-b22503a9c3bd8a3512fa4daf2c6c456d12db34de.tar.gz
PCI: mvebu: Check valid base address before port setup
This driver does not fail to probe when it cannot obtain a port base address. Therefore, add a check for NULL base address before setting up the port, which prevents a kernel panic in such cases. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-mvebu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 424a7b8..338691b 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -662,6 +662,8 @@ static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
for (i = 0; i < pcie->nports; i++) {
struct mvebu_pcie_port *port = &pcie->ports[i];
+ if (!port->base)
+ continue;
mvebu_pcie_setup_hw(port);
}
OpenPOWER on IntegriCloud