提交 ddd535f1 编写于 作者: H Harunobu Kurokawa 提交者: Bjorn Helgaas

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: NHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NSimon Horman <horms+renesas@verge.net.au>
上级 3c60e01a
......@@ -1196,6 +1196,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
err_free_bridge:
pci_free_host_bridge(bridge);
pci_free_resource_list(&pcie->resources);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册