Netdev List
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: ixp4xx_eth: Return proper error for eth_init_one
Date: Wed, 05 Jan 2011 18:43:22 +0100	[thread overview]
Message-ID: <m3bp3vi6v9.fsf@intrepid.localdomain> (raw)
In-Reply-To: <1294205046.8294.2.camel@mola> (Axel Lin's message of "Wed, 05 Jan 2011 13:24:06 +0800")

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

  reply	other threads:[~2011-01-05 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-01-06 19:11   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bp3vi6v9.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=axel.lin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox