Skip to content

Commit d16d9d2

Browse files
Colin Ian Kingdavem330
authored andcommitted
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: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1e10f3f commit d16d9d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/mscc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int vsc85xx_config_init(struct phy_device *phydev)
8484

8585
static int vsc85xx_ack_interrupt(struct phy_device *phydev)
8686
{
87-
int rc;
87+
int rc = 0;
8888

8989
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
9090
rc = phy_read(phydev, MII_VSC85XX_INT_STATUS);

0 commit comments

Comments
 (0)