diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-09-04 14:53:13 +0200 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2017-10-23 11:19:25 +0530 |
commit | 11a6e41c0ee503ffcb971d260bd07dc99b77f13a (patch) | |
tree | 1ab129285ed571d6c75592a454365a1629cb9e92 /include/linux/phy/phy.h | |
parent | 5954a10e8e12ddffd54bfb6b3365aec2c31aa615 (diff) | |
download | lwn-11a6e41c0ee503ffcb971d260bd07dc99b77f13a.tar.gz lwn-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/linux/phy/phy.h')
-rw-r--r-- | include/linux/phy/phy.h | 2 |
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, |