]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mscc: fix a possible double unlock
authorAntoine Tenart <antoine.tenart@bootlin.com>
Thu, 25 Jun 2020 15:42:05 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:22:11 +0000 (16:22 -0700)
commit8f4525330b0d94c752a272019d303f7e3745be4d
treeb24a9c51496b09b3507830893e52a277c2743418
parenta38347639b5b5c63dd035fd183d088434a4d9b84
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: 099a6e772588 ("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>
drivers/net/phy/mscc/mscc_main.c