If we're trying to get a handle to an optional phy, then the phy framework being disabled shouldn't return an hard error. Instead, return NULL just like phy_optional_get does when there's no phy provided in the DT.
Unified · Split
| @@ -291,7 +291,7 @@ static inline struct phy *devm_phy_get(struct device *dev, const char *string) · 290 unmodified lines | ||
| 291 | 291 | static inline struct phy *devm_phy_optional_get(struct device *dev, |
| 292 | 292 | const char *string) |
| 293 | 293 | { |
| 294 | − return ERR_PTR(-ENOSYS); | |
| 294 | + return NULL; | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | static inline struct phy *devm_of_phy_get(struct device *dev, |