aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec/tulip/dmfe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/dec/tulip/dmfe.c')
-rw-r--r--drivers/net/ethernet/dec/tulip/dmfe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index 4d6fe604fa64..d23755ea9bc7 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -446,13 +446,17 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
446 /* Allocate Tx/Rx descriptor memory */ 446 /* Allocate Tx/Rx descriptor memory */
447 db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * 447 db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) *
448 DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); 448 DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
449 if (!db->desc_pool_ptr) 449 if (!db->desc_pool_ptr) {
450 err = -ENOMEM;
450 goto err_out_res; 451 goto err_out_res;
452 }
451 453
452 db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * 454 db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC *
453 TX_DESC_CNT + 4, &db->buf_pool_dma_ptr); 455 TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
454 if (!db->buf_pool_ptr) 456 if (!db->buf_pool_ptr) {
457 err = -ENOMEM;
455 goto err_out_free_desc; 458 goto err_out_free_desc;
459 }
456 460
457 db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; 461 db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr;
458 db->first_tx_desc_dma = db->desc_pool_dma_ptr; 462 db->first_tx_desc_dma = db->desc_pool_dma_ptr;
@@ -462,8 +466,10 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
462 db->chip_id = ent->driver_data; 466 db->chip_id = ent->driver_data;
463 /* IO type range. */ 467 /* IO type range. */
464 db->ioaddr = pci_iomap(pdev, 0, 0); 468 db->ioaddr = pci_iomap(pdev, 0, 0);
465 if (!db->ioaddr) 469 if (!db->ioaddr) {
470 err = -ENOMEM;
466 goto err_out_free_buf; 471 goto err_out_free_buf;
472 }
467 473
468 db->chip_revision = pdev->revision; 474 db->chip_revision = pdev->revision;
469 db->wol_mode = 0; 475 db->wol_mode = 0;