Skip to contentSkip to conversation

PCI/IA64: fix memleak for create pci root bus fail

PATCH In review Yijing Wang 1 participant 1 message Jun 4, 2013

lore
Share & tools
lore
#0 lore raw

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.

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
index a7ebe5f..00487b8 100644
@@ -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