patch-2.3.99-pre7 linux/drivers/net/tokenring/tmspci.c
Next file: linux/drivers/net/tulip/tulip_core.c
Previous file: linux/drivers/net/tokenring/tms380tr.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Fri Apr 28 23:00:05 2000
- Orig file:
v2.3.99-pre6/linux/drivers/net/tokenring/tmspci.c
- Orig date:
Fri Jan 28 15:09:07 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/tokenring/tmspci.c linux/drivers/net/tokenring/tmspci.c
@@ -137,11 +137,12 @@
if (versionprinted++ == 0)
printk("%s", version);
- pci_enable_device(pdev);
+ if (pci_enable_device(pdev))
+ continue;
/* Remove I/O space marker in bit 0. */
pci_irq_line = pdev->irq;
- pci_ioaddr = pdev->resource[0].start ;
+ pci_ioaddr = pci_resource_start (pdev, 0);
if(check_region(pci_ioaddr, TMS_PCI_IO_EXTENT))
continue;
@@ -149,11 +150,15 @@
/* At this point we have found a valid card. */
dev = init_trdev(NULL, 0);
+ if (!dev) {
+ continue; /*return (-ENOMEM);*/ /* continue; ?? */
+ }
- request_region(pci_ioaddr, TMS_PCI_IO_EXTENT, cardinfo->name);
+ request_region(pci_ioaddr, TMS_PCI_IO_EXTENT, cardinfo->name); /* XXX check return */
if(request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ,
cardinfo->name, dev)) {
release_region(pci_ioaddr, TMS_PCI_IO_EXTENT);
+ /* XXX free trdev */
continue; /*return (-ENODEV);*/ /* continue; ?? */
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)