aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2017-09-04 08:53:13 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2017-10-23 01:49:25 -0400
commit11a6e41c0ee503ffcb971d260bd07dc99b77f13a (patch)
tree1ab129285ed571d6c75592a454365a1629cb9e92 /include/linux/phy
parent5954a10e8e12ddffd54bfb6b3365aec2c31aa615 (diff)
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. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy')
-rw-r--r--include/linux/phy/phy.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e694d4008c4a..10888a717860 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -291,7 +291,7 @@ static inline struct phy *devm_phy_get(struct device *dev, const char *string)
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,