Validate iproc->base for BCMA devices just like we already do for platform devices in iproc_pcie_pltfm_probe(). No functional change intended. Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> --- drivers/pci/host/pcie-iproc-bcma.c | 5 +++++ drivers/pci/host/pcie-iproc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-iproc-bcma.c b/drivers/pci/host/pcie-iproc-bcma.c index 72273ff..5377328 100644 --- a/drivers/pci/host/pcie-iproc-bcma.c +++ b/drivers/pci/host/pcie-iproc-bcma.c @@ -55,6 +55,11 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) bcma_set_drvdata(bdev, iproc); iproc->base = bdev->io_addr; + if (!iproc->base) { + dev_err(&bdev->dev, "no controller registers\n"); + return -ENOMEM; + } + iproc->base_addr = bdev->addr; res_mem.start = bdev->addr_s[0]; diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index 38f5ee0..3de157a 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -457,7 +457,7 @@ int iproc_pcie_setup(struct iproc_pcie *iproc, struct list_head *res) void *sysdata; struct pci_bus *bus; - if (!iproc || !iproc->dev || !iproc->base) + if (!iproc || !iproc->dev) return -EINVAL; ret = devm_request_pci_bus_resources(iproc->dev, res); -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html