netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ixp4xx_eth: Return proper error for eth_init_one
@ 2011-01-05  5:24 Axel Lin
  2011-01-05 17:43 ` Krzysztof Halasa
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-01-05  5:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Krzysztof Halasa, David S. Miller, netdev

Return PTR_ERR(port->phydev) instead of 1 if phy_connect failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/net/arm/ixp4xx_eth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
index 6028226..9eb9b98 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;
 
-- 
1.7.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-06 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05  5:24 [PATCH] net: ixp4xx_eth: Return proper error for eth_init_one Axel Lin
2011-01-05 17:43 ` Krzysztof Halasa
2011-01-06 19:11   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).