Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46556
b: refs/heads/master
c: 7f60c64
h: refs/heads/master
v: v3
  • Loading branch information
shemminger@linux-foundation.org authored and Jeff Garzik committed Feb 5, 2007
1 parent 77a1016 commit 06b3e68
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2bf56fe25cef2a7652f7b2ab37ac14a336c76c75
refs/heads/master: 7f60c64bd0e7262b51faefcce5d8df9d51d84b60
20 changes: 14 additions & 6 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,7 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
static int __devinit sky2_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct net_device *dev, *dev1 = NULL;
struct net_device *dev;
struct sky2_hw *hw;
int err, using_dac = 0;

Expand Down Expand Up @@ -3423,8 +3423,10 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
hw->chip_id, hw->chip_rev);

dev = sky2_init_netdev(hw, 0, using_dac);
if (!dev)
if (!dev) {
err = -ENOMEM;
goto err_out_free_pci;
}

if (!disable_msi && pci_enable_msi(pdev) == 0) {
err = sky2_test_msi(hw);
Expand Down Expand Up @@ -3452,13 +3454,19 @@ static int __devinit sky2_probe(struct pci_dev *pdev,

sky2_show_addr(dev);

if (hw->ports > 1 && (dev1 = sky2_init_netdev(hw, 1, using_dac))) {
if (register_netdev(dev1) == 0)
if (hw->ports > 1) {
struct net_device *dev1;

dev1 = sky2_init_netdev(hw, 1, using_dac);
if (!dev1) {
printk(KERN_WARNING PFX
"allocation of second port failed\n");
}
else if (!(err = register_netdev(dev1)))
sky2_show_addr(dev1);
else {
/* Failure to register second port need not be fatal */
printk(KERN_WARNING PFX
"register of second port failed\n");
"register of second port failed (%d)\n", err);
hw->dev[1] = NULL;
free_netdev(dev1);
}
Expand Down

0 comments on commit 06b3e68

Please sign in to comment.