[linux-yocto] [PATCH 13/52] arm/axxia: pci: Add missing calls to release_resource
Daniel Dragomir
daniel.dragomir at windriver.com
Wed Jan 28 09:18:27 PST 2015
From: Fredrik Markström <fredrik.markstrom at gmail.com>
Release io-resource in a couple of failure cases, this used to cause oopses
when cat:nig /proc/ioports
Signed-off-by: Fredrik Markström <fredrik.markstrom at gmail.com>
Signed-off-by: Anders Berg <anders.berg at avagotech.com>
---
arch/arm/mach-axxia/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-axxia/pci.c b/arch/arm/mach-axxia/pci.c
index 6dd3fae..c33f1e5 100644
--- a/arch/arm/mach-axxia/pci.c
+++ b/arch/arm/mach-axxia/pci.c
@@ -614,6 +614,7 @@ static int axxia_pcie_setup(int portno, struct pci_sys_data *sys)
if (err) {
pr_err("PCIE%d: Failed to request IRQ#%d (%d)\n",
sys->domain, port->irq[0], err);
+ release_resource(&sys->io_res);
goto fail;
}
@@ -654,6 +655,7 @@ static int axxia_pcie_setup(int portno, struct pci_sys_data *sys)
if (link_state != 0xb) {
pr_warn("PCIE%d: Link in bad state - giving up!\n",
port->index);
+ release_resource(&sys->io_res);
goto fail;
}
}
--
1.8.1.4
More information about the linux-yocto
mailing list