]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: unlock after phy_select_page() failure
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 29 May 2020 10:02:07 +0000 (13:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 May 2020 19:48:41 +0000 (12:48 -0700)
commit14814ce8493e142f20874d2c98315921441d192e
tree5b58f18a6b84b8ff04557f46fb13b7ed420e3872
parent48eb65635a6a7366914a746c4e92cd0c31cc4d46
net: phy: marvell: unlock after phy_select_page() failure

We need to call phy_restore_page() even if phy_select_page() fails.
Otherwise we are holding the phy_lock_mdio_bus() lock.  This requirement
is documented at the start of the phy_select_page() function.

Fixes: e98f0bf1b985 ("net : phy: marvell: Speedup TDR data retrieval by only changing page once")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c