Skip to content

Commit 1010c17

Browse files
committed
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 <[email protected]>
2 parents 33c4368 + 47d2021 commit 1010c17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/phy/mscc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static int vsc85xx_mdix_set(struct phy_device *phydev, u8 mdix)
522522

523523
static int vsc85xx_downshift_get(struct phy_device *phydev, u8 *count)
524524
{
525-
u16 reg_val;
525+
int reg_val;
526526

527527
reg_val = phy_read_paged(phydev, MSCC_PHY_PAGE_EXTENDED,
528528
MSCC_PHY_ACTIPHY_CNTL);
@@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev)
12921292
dev_err(dev,
12931293
"%s: failed to assert reset of micro\n",
12941294
__func__);
1295-
return ret;
1295+
goto out;
12961296
}
12971297
}
12981298
} else {

0 commit comments

Comments
 (0)