PCI/IA64: fix memleak for create pci root bus fail
PATCH 5/8 PCI/IA64: fix memleak for create pci root bus fail
From: Jiang Liu <[email protected]>
If pci_create_root_bus() return fail, we should release pci root info, pci controller etc.
Signed-off-by Jiang Liu <[email protected]>
Signed-off-by Yijing Wang <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
--- arch/ia64/include/asm/pci.h | 5 +++ arch/ia64/pci/pci.c | 75 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 65 insertions(+), 15 deletions(-)
arch/ia64/include/asm/pci.h +5 -0
@@ -89,6 +89,11 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,#define pci_legacy_read platform_pci_legacy_read#define pci_legacy_write platform_pci_legacy_write +struct iospace_resource { +struct list_head list; +struct resource res; +}; +struct pci_controller {void *acpi_handle;void *iommu;
arch/ia64/pci/pci.c +60 -15
135 lines not on this page · raw message
Signature · 1 line
1.7.1