summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-01-04 20:24:06 +0100
committerDavid S. Miller <davem@davemloft.net>2011-01-06 20:12:01 +0100
commit0c6610017459ed9642548694fe88971d3f4206aa (patch)
treec9ce737e7e881f611b894605fee75f6eee0f1a50
parentinclude/linux/if_ether.h: Add #define ETH_P_LINK_CTL for HPNA and wlan local ... (diff)
downloadlinux-0c6610017459ed9642548694fe88971d3f4206aa.tar.xz
linux-0c6610017459ed9642548694fe88971d3f4206aa.zip
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: Axel Lin <axel.lin@gmail.com> Acked-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/arm/ixp4xx_eth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
index 6028226a7270..9eb9b98a7ae3 100644
--- a/drivers/net/arm/ixp4xx_eth.c
+++ b/drivers/net/arm/ixp4xx_eth.c
@@ -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,
PHY_INTERFACE_MODE_MII);
- 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;