aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy/phy-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy/phy-uclass.c')
-rw-r--r--drivers/phy/phy-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index d745e7babc..343c23cead 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -517,8 +517,8 @@ int generic_setup_phy(struct udevice *dev, struct phy *phy, int index)
ret = generic_phy_get_by_index(dev, index, phy);
if (ret) {
- if (ret != -ENOENT)
- return ret;
+ if (ret == -ENOENT)
+ return 0;
} else {
ret = generic_phy_init(phy);
if (ret)