lkml.org 
[lkml]   [2011]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] net: ixp4xx_eth: Return proper error for eth_init_one
Date
Axel Lin <axel.lin@gmail.com> writes:

> Return PTR_ERR(port->phydev) instead of 1 if phy_connect failed.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

> --- 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;

Right. Thanks.

Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
--
Krzysztof Halasa


\
 
 \ /
  Last update: 2011-01-05 18:47    [W:0.050 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site