mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 16:29:55 +07:00
net: phy: mscc: fix a possible double unlock
On vsc8584_ptp_init failure we jump to the 'err' label, which unlocks
the MDIO bus lock. But vsc8584_ptp_init isn't called with the MDIO bus
lock taken, which could result in a double unlock. Fix this.
Fixes: ab2bf93393
("net: phy: mscc: 1588 block initialization")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
853bede848
commit
b16a213b4d
@ -1436,7 +1436,7 @@ static int vsc8584_config_init(struct phy_device *phydev)
|
||||
|
||||
ret = vsc8584_ptp_init(phydev);
|
||||
if (ret)
|
||||
goto err;
|
||||
return ret;
|
||||
|
||||
phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user