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.
}
/* 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;