patch-2.4.19 linux-2.4.19/arch/arm/kernel/via82c505.c

Next file: linux-2.4.19/arch/arm/lib/backtrace.S
Previous file: linux-2.4.19/arch/arm/kernel/traps.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/arm/kernel/via82c505.c linux-2.4.19/arch/arm/kernel/via82c505.c
@@ -157,8 +157,15 @@
 	struct pci_bus *bus;
 
 	printk(KERN_DEBUG "PCI: VIA 82c505\n");
-	request_region(0xA8,2,"via config");
-	request_region(0xCF8,8,"pci config");
+	if (!request_region(0xA8,2,"via config")) {
+		printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n");
+		return;
+	}
+	if (!request_region(0xCF8,8,"pci config")) {
+		printk(KERN_WARNING"VIA 82c505: Unable to request region 0xCF8\n");
+		release_region(0xA8, 2);
+		return;
+	}
 
 	/* Enable compatible Mode */
 	outb(0x96,0xA8);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)