Skip to content
Commit 4e9d9d1f authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

net: phy: icplus: call phy_restore_page() when phy_select_page() fails

The comments to phy_select_page() say that "phy_restore_page() must
always be called after this, irrespective of success or failure of this
call."  If we don't call phy_restore_page() then we are still holding
the phy_lock_mdio_bus() so it eventually leads to a dead lock.

Fixes: 32ab60e5 ("net: phy: icplus: add MDI/MDIX support for IP101A/G")
Fixes: f9bc51e6

 ("net: phy: icplus: fix paged register access")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/YC+OpFGsDPXPnXM5@mwanda


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0a8a8000
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment