* [PATCH] acorn_request_region fix 2.5.48
@ 2002-11-25 5:43 Dhammika Pathirana
2002-12-30 15:22 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Dhammika Pathirana @ 2002-11-25 5:43 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
Hi,
Following patch is to fix acorn request region failure. Pls apply.
dhammika
-----------------
diff -urN ./linux-2.5.48/drivers/acorn/net/ether1.c
./linux/drivers/acorn/net/ether1.c
--- ./linux-2.5.48/drivers/acorn/net/ether1.c Mon Nov 18 10:29:47 2002
+++ ./linux/drivers/acorn/net/ether1.c Mon Nov 25 11:19:52 2002
@@ -1035,13 +1035,20 @@
/*
* these will not fail - the nature of the bus ensures this
*/
- request_region(dev->base_addr, 16, dev->name);
- request_region(dev->base_addr + 0x800, 4096, dev->name);
+ if(!request_region(dev->base_addr, 16, dev->name)){
+ ret = -EBUSY;
+ goto release1;
+ }
+
+ if(!request_region(dev->base_addr + 0x800, 4096, dev->name)){
+ ret = -EBUSY;
+ goto release2;
+ }
priv = (struct ether1_priv *)dev->priv;
if ((priv->bus_type = ether1_reset(dev)) == 0) {
ret = -ENODEV;
- goto release;
+ goto release3;
}
printk(KERN_INFO "%s: ether1 in slot %d, ",
@@ -1054,7 +1061,7 @@
if (ether1_init_2(dev)) {
ret = -ENODEV;
- goto release;
+ goto release3;
}
dev->open = ether1_open;
@@ -1069,9 +1076,11 @@
ecard_set_drvdata(ec, dev);
return 0;
-release:
+release3:
release_region(dev->base_addr, 16);
+release2:
release_region(dev->base_addr + 0x800, 4096);
+release1:
unregister_netdev(dev);
-----------------
[-- Attachment #2: Disclaimer_Message.txt --]
[-- Type: text/plain, Size: 341 bytes --]
----------------------------------------- (on postoffice)
The information contained in this email is confidential and is meant to be read only by the person to whom it is addressed.Please visit http://www.millenniumit.com/legal/email.htm to read the entire confidentiality clause.
---------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-30 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-25 5:43 [PATCH] acorn_request_region fix 2.5.48 Dhammika Pathirana
2002-12-30 15:22 ` Russell King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.