Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368178
b: refs/heads/master
c: 2a80b5e
h: refs/heads/master
v: v3
  • Loading branch information
Jonas Gorski authored and David S. Miller committed Mar 10, 2013
1 parent 61bdf9a commit dc84dba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 1c03da0522e91617fcadeb7dd596ee41f2b116b9
refs/heads/master: 2a80b5e1580cf6b2c534674080dc3fdf788b06b8
8 changes: 3 additions & 5 deletions trunk/drivers/net/ethernet/broadcom/bcm63xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
* if a slave is not present on hw */
bus->phy_mask = ~(1 << priv->phy_id);

bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
bus->irq = devm_kzalloc(&pdev->dev, sizeof(int) * PHY_MAX_ADDR,
GFP_KERNEL);
if (!bus->irq) {
ret = -ENOMEM;
goto out_free_mdio;
Expand Down Expand Up @@ -1788,10 +1789,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
return 0;

out_unregister_mdio:
if (priv->mii_bus) {
if (priv->mii_bus)
mdiobus_unregister(priv->mii_bus);
kfree(priv->mii_bus->irq);
}

out_free_mdio:
if (priv->mii_bus)
Expand Down Expand Up @@ -1832,7 +1831,6 @@ static int bcm_enet_remove(struct platform_device *pdev)

if (priv->has_phy) {
mdiobus_unregister(priv->mii_bus);
kfree(priv->mii_bus->irq);
mdiobus_free(priv->mii_bus);
} else {
struct bcm63xx_enet_platform_data *pd;
Expand Down

0 comments on commit dc84dba

Please sign in to comment.