diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-17 22:08:56 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-17 22:08:56 -0700 |
commit | 1010c17ec5b496b54785dfb96f739d0f880484b3 (patch) | |
tree | 0e58e9ab8b78310f52274ad50164542e543c6271 | |
parent | 33c4368ee2589c165aebd8d388cbd91e9adb9688 (diff) | |
parent | 47d20212aa1c64f52aba0c5409d03c22bf25cd66 (diff) | |
download | lwn-1010c17ec5b496b54785dfb96f739d0f880484b3.tar.gz lwn-1010c17ec5b496b54785dfb96f739d0f880484b3.zip |
Merge branch 'mscc-fixes'
Gustavo A. R. Silva says:
====================
fix signedness bug and memory leak in mscc driver
This patchset aims to fix a signedness bug in function
vsc85xx_downshift_get() and a memory leak in function
vsc8574_config_pre_init().
Changes in v3:
- Add Quentin's Reviewed-by to commit log in patch 2/2.
- Post the series to netdev.
Changes in v2:
- Add Quentin's Reviewed-by to commit log in patch 1/2.
- Jump to out label so all functions in the driver exit with the PHY
set to access the standard page. Thanks to Quentin Schulz for
pointing this out.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mscc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index bffe077dc75f..a2e59f4f6f01 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -522,7 +522,7 @@ static int vsc85xx_mdix_set(struct phy_device *phydev, u8 mdix) static int vsc85xx_downshift_get(struct phy_device *phydev, u8 *count) { - u16 reg_val; + int reg_val; reg_val = phy_read_paged(phydev, MSCC_PHY_PAGE_EXTENDED, MSCC_PHY_ACTIPHY_CNTL); @@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev) dev_err(dev, "%s: failed to assert reset of micro\n", __func__); - return ret; + goto out; } } } else { |