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>
This commit is contained in:
Harunobu Kurokawa 2017-08-04 12:32:55 +09:00 committed by Bjorn Helgaas
parent 3c60e01a12
commit ddd535f1ea

View File

@ -1196,6 +1196,7 @@ err_pm_disable:
err_free_bridge:
pci_free_host_bridge(bridge);
pci_free_resource_list(&pcie->resources);
return err;
}