net: macb: fix the building warning
PATCH 1/1 net: macb: fix the building warning
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 <[email protected]>
--- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/macb.c +1 -1
@@ -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 ;#endif u32 ncfgr;u16 phy_id, status, adv, lpa;
Signature · 1 line
1.7.9.5
Andreas Bießmann
NAKPATCH 1/1 net: macb: fix the building warning
Hi Bo,
Quoted 18 lines · Bo Shen
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 <[email protected]>--- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/macb.c +0
-0
drivers/net/macb.c static int macb_phy_init(struct macb_device *macb) · line 377
Quoted 5 lines
drivers/net/macb.c +1
-1@@ -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