diff options
author | Guenter Roeck <linux@roeck-us.net> | 2017-02-25 13:08:12 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-25 18:06:02 +0300 |
commit | c0464062bfea9cd2ef6643d93429eafe8f6c2a4a (patch) | |
tree | 7e2946056d89babfe5d50cb25c9c6f984ec33521 /drivers/pci/dwc/pcie-artpec6.c | |
parent | 9e314890292c0dd357eadef6a043704fa0b4c157 (diff) | |
download | linux-c0464062bfea9cd2ef6643d93429eafe8f6c2a4a.tar.xz |
PCI: dwc: Fix crashes seen due to missing assignments
Fix the following crash, seen in dwc/pci-imx6.
Unable to handle kernel NULL pointer dereference at virtual address 00000070
pgd = c0004000
[00000070] *pgd=00000000
Internal error: Oops: 805 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-09686-g9e31489 #1
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
task: cb850000 task.stack: cb84e000
PC is at imx6_pcie_probe+0x2f4/0x414
...
While at it, fix the same problem in various drivers instead of waiting for
individual crash reports.
The change in the imx6 driver was tested with qemu. The changes in other
drivers are based on code inspection and have been compile tested only.
Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> # designware-plat
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/pci/dwc/pcie-artpec6.c')
-rw-r--r-- | drivers/pci/dwc/pcie-artpec6.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c index 59ecc9e66436..fcd3ef845883 100644 --- a/drivers/pci/dwc/pcie-artpec6.c +++ b/drivers/pci/dwc/pcie-artpec6.c @@ -253,6 +253,8 @@ static int artpec6_pcie_probe(struct platform_device *pdev) pci->dev = dev; + artpec6_pcie->pci = pci; + dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi"); pci->dbi_base = devm_ioremap_resource(dev, dbi_base); if (IS_ERR(pci->dbi_base)) |