mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
bcm63xx_enet: avoid uninitialized variable warning
am: 04275d2a8a
Change-Id: Iaa44475569e8d1ac6c52ee5a430b50513ecd9860
This commit is contained in:
@@ -913,6 +913,8 @@ static int bcm_enet_open(struct net_device *dev)
|
||||
priv->old_link = 0;
|
||||
priv->old_duplex = -1;
|
||||
priv->old_pause = -1;
|
||||
} else {
|
||||
phydev = NULL;
|
||||
}
|
||||
|
||||
/* mask all interrupts and request them */
|
||||
@@ -1083,7 +1085,7 @@ static int bcm_enet_open(struct net_device *dev)
|
||||
enet_dmac_writel(priv, priv->dma_chan_int_mask,
|
||||
ENETDMAC_IRMASK, priv->tx_chan);
|
||||
|
||||
if (priv->has_phy)
|
||||
if (phydev)
|
||||
phy_start(phydev);
|
||||
else
|
||||
bcm_enet_adjust_link(dev);
|
||||
@@ -1126,7 +1128,7 @@ out_freeirq:
|
||||
free_irq(dev->irq, dev);
|
||||
|
||||
out_phy_disconnect:
|
||||
if (priv->has_phy)
|
||||
if (phydev)
|
||||
phy_disconnect(phydev);
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user