Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210134
b: refs/heads/master
c: 945c7c7
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Aug 24, 2010
1 parent 5091651 commit c6cbd50
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 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: 4169591fd7c260b2b0b4e8f4d51f63f5b15ad78a
refs/heads/master: 945c7c73e2e81d68e3e2970afd95254e8f153fc9
44 changes: 22 additions & 22 deletions trunk/drivers/net/pxa168_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
dev = alloc_etherdev(sizeof(struct pxa168_eth_private));
if (!dev) {
err = -ENOMEM;
goto out;
goto err_clk;
}

platform_set_drvdata(pdev, dev);
Expand All @@ -1507,12 +1507,12 @@ static int pxa168_eth_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
err = -ENODEV;
goto out;
goto err_netdev;
}
pep->base = ioremap(res->start, res->end - res->start + 1);
if (pep->base == NULL) {
err = -ENOMEM;
goto out;
goto err_netdev;
}
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
BUG_ON(!res);
Expand Down Expand Up @@ -1549,7 +1549,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
pep->smi_bus = mdiobus_alloc();
if (pep->smi_bus == NULL) {
err = -ENOMEM;
goto out;
goto err_base;
}
pep->smi_bus->priv = pep;
pep->smi_bus->name = "pxa168_eth smi";
Expand All @@ -1558,31 +1558,31 @@ static int pxa168_eth_probe(struct platform_device *pdev)
snprintf(pep->smi_bus->id, MII_BUS_ID_SIZE, "%d", pdev->id);
pep->smi_bus->parent = &pdev->dev;
pep->smi_bus->phy_mask = 0xffffffff;
if (mdiobus_register(pep->smi_bus) < 0) {
err = -ENOMEM;
goto out;
}
err = mdiobus_register(pep->smi_bus);
if (err)
goto err_free_mdio;

pxa168_init_hw(pep);
err = ethernet_phy_setup(dev);
if (err)
goto out;
goto err_mdiobus;
SET_NETDEV_DEV(dev, &pdev->dev);
err = register_netdev(dev);
if (err)
goto out;
goto err_mdiobus;
return 0;
out:
if (pep->clk) {
clk_disable(pep->clk);
clk_put(pep->clk);
pep->clk = NULL;
}
if (pep->base) {
iounmap(pep->base);
pep->base = NULL;
}
if (dev)
free_netdev(dev);

err_mdiobus:
mdiobus_unregister(pep->smi_bus);
err_free_mdio:
mdiobus_free(pep->smi_bus);
err_base:
iounmap(pep->base);
err_netdev:
free_netdev(dev);
err_clk:
clk_disable(clk);
clk_put(clk);
return err;
}

Expand Down

0 comments on commit c6cbd50

Please sign in to comment.