Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f66e5b29 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI: iproc: Validate CSR base in BCMA setup code



Validate iproc_pcie->base for BCMA devices just like we already do for
platform devices in iproc_pcie_pltfm_probe().  No functional change
intended.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 556c7bb7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev)
	pcie->dev = dev;

	pcie->base = bdev->io_addr;
	if (!pcie->base) {
		dev_err(dev, "no controller registers\n");
		return -ENOMEM;
	}

	pcie->base_addr = bdev->addr;

	res_mem.start = bdev->addr_s[0];
+1 −1
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
	void *sysdata;
	struct pci_bus *bus;

	if (!pcie || !pcie->dev || !pcie->base)
	if (!pcie || !pcie->dev)
		return -EINVAL;

	dev = pcie->dev;