提交 9e7bd330 编写于 作者: J Jesse Brandeburg 提交者: Jeff Garzik

ixgb: clean up assignments inside if statements

Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 fc2d14e3
...@@ -355,15 +355,16 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -355,15 +355,16 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int i; int i;
int err; int err;
if ((err = pci_enable_device(pdev))) err = pci_enable_device(pdev);
if (err)
return err; return err;
if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
!(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
pci_using_dac = 1; pci_using_dac = 1;
} else { } else {
if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
(err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
printk(KERN_ERR printk(KERN_ERR
"ixgb: No usable DMA configuration, aborting\n"); "ixgb: No usable DMA configuration, aborting\n");
goto err_dma_mask; goto err_dma_mask;
...@@ -371,7 +372,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -371,7 +372,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_using_dac = 0; pci_using_dac = 0;
} }
if ((err = pci_request_regions(pdev, ixgb_driver_name))) err = pci_request_regions(pdev, ixgb_driver_name);
if (err)
goto err_request_regions; goto err_request_regions;
pci_set_master(pdev); pci_set_master(pdev);
...@@ -435,7 +437,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -435,7 +437,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* setup the private structure */ /* setup the private structure */
if ((err = ixgb_sw_init(adapter))) err = ixgb_sw_init(adapter);
if (err)
goto err_sw_init; goto err_sw_init;
netdev->features = NETIF_F_SG | netdev->features = NETIF_F_SG |
...@@ -474,7 +477,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -474,7 +477,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task); INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task);
strcpy(netdev->name, "eth%d"); strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev))) err = register_netdev(netdev);
if (err)
goto err_register; goto err_register;
/* we're going to reset, so assume we have no link for now */ /* we're going to reset, so assume we have no link for now */
...@@ -594,16 +598,18 @@ ixgb_open(struct net_device *netdev) ...@@ -594,16 +598,18 @@ ixgb_open(struct net_device *netdev)
int err; int err;
/* allocate transmit descriptors */ /* allocate transmit descriptors */
err = ixgb_setup_tx_resources(adapter);
if ((err = ixgb_setup_tx_resources(adapter))) if (err)
goto err_setup_tx; goto err_setup_tx;
/* allocate receive descriptors */ /* allocate receive descriptors */
if ((err = ixgb_setup_rx_resources(adapter))) err = ixgb_setup_rx_resources(adapter);
if (err)
goto err_setup_rx; goto err_setup_rx;
if ((err = ixgb_up(adapter))) err = ixgb_up(adapter);
if (err)
goto err_up; goto err_up;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册