@@ -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];
@@ -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);
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@google.com> --- drivers/pci/host/pcie-iproc-bcma.c | 5 +++++ drivers/pci/host/pcie-iproc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html