Commit 0c661001 authored by Axel Lin's avatar Axel Lin Committed by David S. Miller
Browse files

net: ixp4xx_eth: Return proper error for eth_init_one

Return PTR_ERR(port->phydev) instead of 1 if phy_connect failed.
Signed-off-by: default avatarAxel Lin <>
Acked-by: default avatarKrzysztof Halasa <>
Signed-off-by: default avatarDavid S. Miller <>
parent 238c8558
......@@ -1229,8 +1229,10 @@ static int __devinit eth_init_one(struct platform_device *pdev)
snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, "0", plat->phy);
port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0,
if ((err = IS_ERR(port->phydev)))
if (IS_ERR(port->phydev)) {
err = PTR_ERR(port->phydev);
goto err_free_mem;
port->phydev->irq = PHY_POLL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment