aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/8390/ne2k-pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c
index 89c8d9fc97de..57e97910c728 100644
--- a/drivers/net/ethernet/8390/ne2k-pci.c
+++ b/drivers/net/ethernet/8390/ne2k-pci.c
@@ -246,13 +246,13 @@ static int ne2k_pci_init_one(struct pci_dev *pdev,
246 246
247 if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) { 247 if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) {
248 dev_err(&pdev->dev, "no I/O resource at PCI BAR #0\n"); 248 dev_err(&pdev->dev, "no I/O resource at PCI BAR #0\n");
249 return -ENODEV; 249 goto err_out;
250 } 250 }
251 251
252 if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) { 252 if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) {
253 dev_err(&pdev->dev, "I/O resource 0x%x @ 0x%lx busy\n", 253 dev_err(&pdev->dev, "I/O resource 0x%x @ 0x%lx busy\n",
254 NE_IO_EXTENT, ioaddr); 254 NE_IO_EXTENT, ioaddr);
255 return -EBUSY; 255 goto err_out;
256 } 256 }
257 257
258 reg0 = inb(ioaddr); 258 reg0 = inb(ioaddr);
@@ -392,6 +392,8 @@ err_out_free_netdev:
392 free_netdev (dev); 392 free_netdev (dev);
393err_out_free_res: 393err_out_free_res:
394 release_region (ioaddr, NE_IO_EXTENT); 394 release_region (ioaddr, NE_IO_EXTENT);
395err_out:
396 pci_disable_device(pdev);
395 return -ENODEV; 397 return -ENODEV;
396} 398}
397 399