summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-14 12:36:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-14 12:36:20 -0700
commit2931dc7d9daf7addc10a126aedf1e630a1a05b49 (patch)
treeca97c5e0e9baf5eeec81e8b555339b9cbeade532
parentd3c329c741af0a7bc338900491dfbb10422f5618 (diff)
parent34d5ac2af644a10958e144b7bb937d289dfd158d (diff)
Merge tag 'pci-v4.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: - fix a typo that broke Rockchip enumeration - fix a new memory leak in the ARM host bridge failure path * tag 'pci-v4.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: rockchip: Check for pci_scan_root_bus_bridge() failure correctly ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak
-rw-r--r--arch/arm/kernel/bios32.c2
-rw-r--r--drivers/pci/host/pcie-rockchip.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 56dc1a3a33b4..c1809fb549dd 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -480,7 +480,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
ret = pcibios_init_resource(nr, sys, hw->io_optional);
if (ret) {
- kfree(sys);
+ pci_free_host_bridge(bridge);
break;
}
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 5acf8694fb23..7bb9870f6d8c 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -1483,7 +1483,7 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
bridge->swizzle_irq = pci_common_swizzle;
err = pci_scan_root_bus_bridge(bridge);
- if (!err)
+ if (err < 0)
goto err_free_res;
bus = bridge->bus;