diff options
| author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-09-04 08:53:13 -0400 |
|---|---|---|
| committer | Kishon Vijay Abraham I <kishon@ti.com> | 2017-10-23 01:49:25 -0400 |
| commit | 11a6e41c0ee503ffcb971d260bd07dc99b77f13a (patch) | |
| tree | 1ab129285ed571d6c75592a454365a1629cb9e92 /include/linux/phy | |
| parent | 5954a10e8e12ddffd54bfb6b3365aec2c31aa615 (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.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) | |||
| 291 | static inline struct phy *devm_phy_optional_get(struct device *dev, | 291 | static 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 | ||
| 297 | static inline struct phy *devm_of_phy_get(struct device *dev, | 297 | static inline struct phy *devm_of_phy_get(struct device *dev, |
