]> git.hungrycats.org Git - linux/commitdiff
[janitor] update the eepro Intel EtherExpress Pro/10 device driver to
authorWilliam Stinson <wstinson@infonie.fr>
Fri, 14 Jun 2002 15:26:12 +0000 (11:26 -0400)
committerJeff Garzik <jgarzik@mandrakesoft.com>
Fri, 14 Jun 2002 15:26:12 +0000 (11:26 -0400)
1) check the status of call to request_region
2) and return an error in case of problem.

I don't have this hardware so compilation checked only.

drivers/net/eepro.c

index 79e131a5d489eb63db4ac87443500d6fda0ebc99..db1de4598974934a100cc321744c5baeb521d766 100644 (file)
@@ -828,8 +828,10 @@ static int __init eepro_probe1(struct net_device *dev, short ioaddr)
                        }
 
                        /* Grab the region so we can find another board if autoIRQ fails. */
-                       request_region(ioaddr, EEPRO_IO_EXTENT, dev->name);
-
+                       if (!request_region(ioaddr, EEPRO_IO_EXTENT, dev->name)) { 
+                               printk(KERN_WARNING "EEPRO: io-port 0x%04x in use \n", ioaddr);
+                               goto freeall;
+                       }
                        ((struct eepro_local *)dev->priv)->lock = SPIN_LOCK_UNLOCKED;
 
                        dev->open               = eepro_open;