History

phy: Return NULL if the phy is optional

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.

Maxime Ripard committed 9 years ago

Commit 11a6e411 parent 5954a101 file · +1 −1Browse files

Showing the changes to include/linux/phy (1 of 1 file). Show all

Unified · Split

include/linux/phy/phy.h+1−1
@@ -291,7 +291,7 @@ static inline struct phy *devm_phy_get(struct device *dev, const char *string) · 290 unmodified lines
291static inline struct phy *devm_phy_optional_get(struct device *dev,291static inline struct phy *devm_phy_optional_get(struct device *dev,
292 const char *string)292 const char *string)
293{293{
294 return ERR_PTR(-ENOSYS);294 return NULL;
295}295}
296 296
297static inline struct phy *devm_of_phy_get(struct device *dev,297static inline struct phy *devm_of_phy_get(struct device *dev,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t