diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-07-08 18:52:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-11 01:20:30 -0400 |
commit | 9e7bd330702bd8d2a87bf8fee027e90c6c90a401 (patch) | |
tree | 3d8e70a4be7464df38d81f2f133941bb610db425 /drivers/net/ixgb | |
parent | fc2d14e36c69a8d44a2f5230835b54e95025363e (diff) |
ixgb: clean up assignments inside if statements
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 365212b9e952..05b2677d6536 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -355,15 +355,16 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
355 | int i; | 355 | int i; |
356 | int err; | 356 | int err; |
357 | 357 | ||
358 | if ((err = pci_enable_device(pdev))) | 358 | err = pci_enable_device(pdev); |
359 | if (err) | ||
359 | return err; | 360 | return err; |
360 | 361 | ||
361 | if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && | 362 | if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && |
362 | !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { | 363 | !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { |
363 | pci_using_dac = 1; | 364 | pci_using_dac = 1; |
364 | } else { | 365 | } else { |
365 | if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || | 366 | if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || |
366 | (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { | 367 | (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { |
367 | printk(KERN_ERR | 368 | printk(KERN_ERR |
368 | "ixgb: No usable DMA configuration, aborting\n"); | 369 | "ixgb: No usable DMA configuration, aborting\n"); |
369 | goto err_dma_mask; | 370 | goto err_dma_mask; |
@@ -371,7 +372,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
371 | pci_using_dac = 0; | 372 | pci_using_dac = 0; |
372 | } | 373 | } |
373 | 374 | ||
374 | if ((err = pci_request_regions(pdev, ixgb_driver_name))) | 375 | err = pci_request_regions(pdev, ixgb_driver_name); |
376 | if (err) | ||
375 | goto err_request_regions; | 377 | goto err_request_regions; |
376 | 378 | ||
377 | pci_set_master(pdev); | 379 | pci_set_master(pdev); |
@@ -435,7 +437,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
435 | 437 | ||
436 | /* setup the private structure */ | 438 | /* setup the private structure */ |
437 | 439 | ||
438 | if ((err = ixgb_sw_init(adapter))) | 440 | err = ixgb_sw_init(adapter); |
441 | if (err) | ||
439 | goto err_sw_init; | 442 | goto err_sw_init; |
440 | 443 | ||
441 | netdev->features = NETIF_F_SG | | 444 | netdev->features = NETIF_F_SG | |
@@ -474,7 +477,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
474 | INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task); | 477 | INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task); |
475 | 478 | ||
476 | strcpy(netdev->name, "eth%d"); | 479 | strcpy(netdev->name, "eth%d"); |
477 | if ((err = register_netdev(netdev))) | 480 | err = register_netdev(netdev); |
481 | if (err) | ||
478 | goto err_register; | 482 | goto err_register; |
479 | 483 | ||
480 | /* we're going to reset, so assume we have no link for now */ | 484 | /* we're going to reset, so assume we have no link for now */ |
@@ -594,16 +598,18 @@ ixgb_open(struct net_device *netdev) | |||
594 | int err; | 598 | int err; |
595 | 599 | ||
596 | /* allocate transmit descriptors */ | 600 | /* allocate transmit descriptors */ |
597 | 601 | err = ixgb_setup_tx_resources(adapter); | |
598 | if ((err = ixgb_setup_tx_resources(adapter))) | 602 | if (err) |
599 | goto err_setup_tx; | 603 | goto err_setup_tx; |
600 | 604 | ||
601 | /* allocate receive descriptors */ | 605 | /* allocate receive descriptors */ |
602 | 606 | ||
603 | if ((err = ixgb_setup_rx_resources(adapter))) | 607 | err = ixgb_setup_rx_resources(adapter); |
608 | if (err) | ||
604 | goto err_setup_rx; | 609 | goto err_setup_rx; |
605 | 610 | ||
606 | if ((err = ixgb_up(adapter))) | 611 | err = ixgb_up(adapter); |
612 | if (err) | ||
607 | goto err_up; | 613 | goto err_up; |
608 | 614 | ||
609 | return 0; | 615 | return 0; |