summaryrefslogtreecommitdiff
path: root/drivers/pci/host
diff options
context:
space:
mode:
authorHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>2017-08-04 12:32:55 +0900
committerBjorn Helgaas <bhelgaas@google.com>2017-08-15 17:51:59 -0500
commitddd535f1ea3eb27eae71acc21fb0fa4ad2d7535d (patch)
treebcf60683f81ea37feb55f75eb274b2aa0c0facbf /drivers/pci/host
parent3c60e01a12461c89db2349b95c77c9eb36fdd439 (diff)
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 <harunobu.kurokawa.dn@renesas.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r--drivers/pci/host/pcie-rcar.c1
1 files changed, 1 insertions, 0 deletions
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;
}