Selaa lähdekoodia

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
Linus Torvalds 8 vuotta sitten
vanhempi
commit
2931dc7d9d
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      arch/arm/kernel/bios32.c
  2. 1 1
      drivers/pci/host/pcie-rockchip.c

+ 1 - 1
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;
 			}
 

+ 1 - 1
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;