public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: macb: fix the building warning
Date: Fri, 16 Aug 2013 13:02:36 +0200	[thread overview]
Message-ID: <520E06CC.7040400@googlemail.com> (raw)
In-Reply-To: <1376617584-15545-1-git-send-email-voice.shen@atmel.com>

Hi Bo,

On 16.08.13 03:46, Bo Shen wrote:
> fix the following building warning
> ---8>---
> macb.c: In function 'macb_init':
> macb.c:400:14: warning: 'phydev' may be used uninitialized in this function
> macb.c:377:21: note: 'phydev' was declared here
> ---<8---
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> 
> ---
>  drivers/net/macb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 1f7cc32..90ae42d 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -374,7 +374,7 @@ static int macb_phy_init(struct macb_device *macb)
>  {
>  	struct eth_device *netdev = &macb->netdev;
>  #ifdef CONFIG_PHYLIB
> -	struct phy_device *phydev;
> +	struct phy_device *phydev = NULL;

NAK, this will deference a NULL pointer later on ...

Best regards

Andreas Bie?mann

      reply	other threads:[~2013-08-16 11:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16  1:46 [U-Boot] [PATCH] net: macb: fix the building warning Bo Shen
2013-08-16 11:02 ` Andreas Bießmann [this message]

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=520E06CC.7040400@googlemail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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