Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122114
b: refs/heads/master
c: 85920d4
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 24, 2008
1 parent fac3b2f commit 99ff331
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 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: 3755810cebf7f9902b05c7ba9baeac0fc44881be
refs/heads/master: 85920d43bd5ae8a96f434704438b57c0b8c31198
18 changes: 7 additions & 11 deletions trunk/drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,7 @@ static void rtl8139_chip_reset (void __iomem *ioaddr)
}


static int __devinit rtl8139_init_board (struct pci_dev *pdev,
struct net_device **dev_out)
static __devinit struct net_device * rtl8139_init_board (struct pci_dev *pdev)
{
void __iomem *ioaddr;
struct net_device *dev;
Expand All @@ -756,13 +755,11 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,

assert (pdev != NULL);

*dev_out = NULL;

/* dev and priv zeroed in alloc_etherdev */
dev = alloc_etherdev (sizeof (*tp));
if (dev == NULL) {
dev_err(&pdev->dev, "Unable to alloc new net device\n");
return -ENOMEM;
return ERR_PTR(-ENOMEM);
}
SET_NETDEV_DEV(dev, &pdev->dev);

Expand Down Expand Up @@ -906,14 +903,13 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,

rtl8139_chip_reset (ioaddr);

*dev_out = dev;
return 0;
return dev;

err_out:
__rtl8139_cleanup_dev (dev);
if (disable_dev_on_err)
pci_disable_device (pdev);
return rc;
return ERR_PTR(rc);
}

static const struct net_device_ops rtl8139_netdev_ops = {
Expand Down Expand Up @@ -972,9 +968,9 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
use_io = 1;
}

i = rtl8139_init_board (pdev, &dev);
if (i < 0)
return i;
dev = rtl8139_init_board (pdev);
if (IS_ERR(dev))
return PTR_ERR(dev);

assert (dev != NULL);
tp = netdev_priv(dev);
Expand Down

0 comments on commit 99ff331

Please sign in to comment.