summaryrefslogtreecommitdiffstats
path: root/drivers/net/apne.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/net/apne.c
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'drivers/net/apne.c')
-rw-r--r--drivers/net/apne.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/apne.c b/drivers/net/apne.c
index 33da607fe..af1e5de11 100644
--- a/drivers/net/apne.c
+++ b/drivers/net/apne.c
@@ -178,9 +178,6 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
8, 9+GAYLE_ODD, 0xa, 0xb+GAYLE_ODD,
0xc, 0xd+GAYLE_ODD, 0xe, 0xf+GAYLE_ODD };
- if (load_8390_module("apne.c"))
- return -ENOSYS;
-
/* We should have a "dev" from Space.c or the static module table. */
if (dev == NULL) {
printk(KERN_ERR "apne.c: Passed a NULL device.\n");
@@ -271,7 +268,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
stop_page = (wordlength == 2) ? 0x40 : 0x20;
} else {
printk(" not found.\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -572,12 +569,16 @@ static struct net_device apne_dev =
int init_module(void)
{
int err;
+
+ if (load_8390_module("apne.c"))
+ return -ENOSYS;
+
if ((err = register_netdev(&apne_dev))) {
if (err == -EIO)
printk("No PCMCIA NEx000 ethernet card found.\n");
+ unload_8390_module();
return (err);
}
- lock_8390_module();
return (0);
}
@@ -591,7 +592,7 @@ void cleanup_module(void)
pcmcia_reset();
- unlock_8390_module();
+ unload_8390_module();
apne_owned = 0;
}