Commit 8f9850dd authored by Dan Carpenter's avatar Dan Carpenter Committed by Paolo Abeni

net: phy: unlock on error in phy_probe()

If genphy_c45_read_eee_adv() fails then we need to do a reset and unlock
the &phydev->lock mutex before returning.

Fixes: 3eeca4e1 ("net: phy: do not force EEE support")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/Y/x/6kHCjnQHqOpF@kiliSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 11f180a5
......@@ -3146,7 +3146,7 @@ static int phy_probe(struct device *dev)
*/
err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
if (err)
return err;
goto out;
/* There is no "enabled" flag. If PHY is advertising, assume it is
* kind of enabled.
......
Markdown is supported
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