summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2017-09-04 14:53:13 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2017-10-23 11:19:25 +0530
commit11a6e41c0ee503ffcb971d260bd07dc99b77f13a (patch)
tree1ab129285ed571d6c75592a454365a1629cb9e92 /include
parent5954a10e8e12ddffd54bfb6b3365aec2c31aa615 (diff)
downloadlinux-11a6e41c0ee503ffcb971d260bd07dc99b77f13a.tar.gz
linux-11a6e41c0ee503ffcb971d260bd07dc99b77f13a.tar.bz2
linux-11a6e41c0ee503ffcb971d260bd07dc99b77f13a.zip
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')
-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)
static inline struct phy *devm_phy_optional_get(struct device *dev,
const char *string)
{
- return ERR_PTR(-ENOSYS);
+ return NULL;
}
static inline struct phy *devm_of_phy_get(struct device *dev,