Skip to content

Commit 8f9850d

Browse files
error27Paolo Abeni
authored andcommitted
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: 3eeca4e ("net: phy: do not force EEE support") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Oleksij Rempel <[email protected]> Link: https://lore.kernel.org/r/Y/x/6kHCjnQHqOpF@kili Signed-off-by: Paolo Abeni <[email protected]>
1 parent 11f180a commit 8f9850d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/phy_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,7 @@ static int phy_probe(struct device *dev)
31463146
*/
31473147
err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
31483148
if (err)
3149-
return err;
3149+
goto out;
31503150

31513151
/* There is no "enabled" flag. If PHY is advertising, assume it is
31523152
* kind of enabled.

0 commit comments

Comments
 (0)