From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Fri, 16 Aug 2013 13:02:36 +0200 Subject: [U-Boot] [PATCH] net: macb: fix the building warning In-Reply-To: <1376617584-15545-1-git-send-email-voice.shen@atmel.com> References: <1376617584-15545-1-git-send-email-voice.shen@atmel.com> Message-ID: <520E06CC.7040400@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > 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