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: 3eeca4e199ce ("net: phy: do not force EEE support") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/Y/x/6kHCjnQHqOpF@kili Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
11f180a5d6
commit
8f9850dd8d
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user