From: Harunobu Kurokawa Date: Fri, 4 Aug 2017 03:32:55 +0000 (+0900) Subject: PCI: rcar: Fix memory leak when no PCIe card is inserted X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git PCI: rcar: Fix memory leak when no PCIe card is inserted When no PCIe card is inserted, there is a memory leak as pci_free_resource_list() is not called before returning. Signed-off-by: Harunobu Kurokawa Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman --- diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 007523e85c66..4e0b25d09b0c 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -1196,6 +1196,7 @@ err_pm_disable: err_free_bridge: pci_free_host_bridge(bridge); + pci_free_resource_list(&pcie->resources); return err; }