Skip to content

Commit 11a6e41

Browse files
mripardkishon
authored andcommitted
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>
1 parent 5954a10 commit 11a6e41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/phy/phy.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static inline struct phy *devm_phy_get(struct device *dev, const char *string)
291291
static inline struct phy *devm_phy_optional_get(struct device *dev,
292292
const char *string)
293293
{
294-
return ERR_PTR(-ENOSYS);
294+
return NULL;
295295
}
296296

297297
static inline struct phy *devm_of_phy_get(struct device *dev,

0 commit comments

Comments
 (0)