aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r--drivers/net/qlge/qlge_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 95fb63dcd9e4..4adca94a521f 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -4437,7 +4437,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4437 err = pcie_set_readrq(pdev, 4096); 4437 err = pcie_set_readrq(pdev, 4096);
4438 if (err) { 4438 if (err) {
4439 dev_err(&pdev->dev, "Set readrq failed.\n"); 4439 dev_err(&pdev->dev, "Set readrq failed.\n");
4440 goto err_out; 4440 goto err_out1;
4441 } 4441 }
4442 4442
4443 err = pci_request_regions(pdev, DRV_NAME); 4443 err = pci_request_regions(pdev, DRV_NAME);
@@ -4458,7 +4458,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4458 4458
4459 if (err) { 4459 if (err) {
4460 dev_err(&pdev->dev, "No usable DMA configuration.\n"); 4460 dev_err(&pdev->dev, "No usable DMA configuration.\n");
4461 goto err_out; 4461 goto err_out2;
4462 } 4462 }
4463 4463
4464 /* Set PCIe reset type for EEH to fundamental. */ 4464 /* Set PCIe reset type for EEH to fundamental. */
@@ -4470,7 +4470,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4470 if (!qdev->reg_base) { 4470 if (!qdev->reg_base) {
4471 dev_err(&pdev->dev, "Register mapping failed.\n"); 4471 dev_err(&pdev->dev, "Register mapping failed.\n");
4472 err = -ENOMEM; 4472 err = -ENOMEM;
4473 goto err_out; 4473 goto err_out2;
4474 } 4474 }
4475 4475
4476 qdev->doorbell_area_size = pci_resource_len(pdev, 3); 4476 qdev->doorbell_area_size = pci_resource_len(pdev, 3);
@@ -4480,14 +4480,14 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4480 if (!qdev->doorbell_area) { 4480 if (!qdev->doorbell_area) {
4481 dev_err(&pdev->dev, "Doorbell register mapping failed.\n"); 4481 dev_err(&pdev->dev, "Doorbell register mapping failed.\n");
4482 err = -ENOMEM; 4482 err = -ENOMEM;
4483 goto err_out; 4483 goto err_out2;
4484 } 4484 }
4485 4485
4486 err = ql_get_board_info(qdev); 4486 err = ql_get_board_info(qdev);
4487 if (err) { 4487 if (err) {
4488 dev_err(&pdev->dev, "Register access failed.\n"); 4488 dev_err(&pdev->dev, "Register access failed.\n");
4489 err = -EIO; 4489 err = -EIO;
4490 goto err_out; 4490 goto err_out2;
4491 } 4491 }
4492 qdev->msg_enable = netif_msg_init(debug, default_msg); 4492 qdev->msg_enable = netif_msg_init(debug, default_msg);
4493 spin_lock_init(&qdev->hw_lock); 4493 spin_lock_init(&qdev->hw_lock);
@@ -4508,7 +4508,7 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4508 err = qdev->nic_ops->get_flash(qdev); 4508 err = qdev->nic_ops->get_flash(qdev);
4509 if (err) { 4509 if (err) {
4510 dev_err(&pdev->dev, "Invalid FLASH.\n"); 4510 dev_err(&pdev->dev, "Invalid FLASH.\n");
4511 goto err_out; 4511 goto err_out2;
4512 } 4512 }
4513 4513
4514 memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); 4514 memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len);
@@ -4542,8 +4542,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
4542 DRV_NAME, DRV_VERSION); 4542 DRV_NAME, DRV_VERSION);
4543 } 4543 }
4544 return 0; 4544 return 0;
4545err_out: 4545err_out2:
4546 ql_release_all(pdev); 4546 ql_release_all(pdev);
4547err_out1:
4547 pci_disable_device(pdev); 4548 pci_disable_device(pdev);
4548 return err; 4549 return err;
4549} 4550}