diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-08-12 21:29:24 +0100 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-09-26 21:27:33 +0200 |
commit | 846afc4183fc14a4fcf440d7aa7046b9a792320c (patch) | |
tree | 9b5a57b7feb8db022f9cbc4fd58ec4a61fe0acaa | |
parent | 6a2cc82217acd80b0a2a8fbb181e62a44b874fa7 (diff) |
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 <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | drivers/net/phy/mscc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index 2e1de53e3548..ad33390b382a 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -84,7 +84,7 @@ static int vsc85xx_config_init(struct phy_device *phydev) static int vsc85xx_ack_interrupt(struct phy_device *phydev) { - int rc; + int rc = 0; if (phydev->interrupts == PHY_INTERRUPT_ENABLED) rc = phy_read(phydev, MII_VSC85XX_INT_STATUS); |