Commit d16d9d2a authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

net: phy: initialize rc to zero to avoid returning garbage value

In the case where phydev->interrupts is not PHY_INTERRUPT_ENABLED
function vsc85xx_ack_interrupt is returning an uninitialized
garbage value.  Fix this by initializing rc to zero.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1e10f3fb
...@@ -84,7 +84,7 @@ static int vsc85xx_config_init(struct phy_device *phydev) ...@@ -84,7 +84,7 @@ static int vsc85xx_config_init(struct phy_device *phydev)
static int vsc85xx_ack_interrupt(struct phy_device *phydev) static int vsc85xx_ack_interrupt(struct phy_device *phydev)
{ {
int rc; int rc = 0;
if (phydev->interrupts == PHY_INTERRUPT_ENABLED) if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
rc = phy_read(phydev, MII_VSC85XX_INT_STATUS); rc = phy_read(phydev, MII_VSC85XX_INT_STATUS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment