phy: Return NULL if the phy is optional
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 4 Sep 2017 12:53:13 +0000 (14:53 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 23 Oct 2017 05:49:25 +0000 (11:19 +0530)
commit11a6e41c0ee503ffcb971d260bd07dc99b77f13a
tree1ab129285ed571d6c75592a454365a1629cb9e92
parent5954a10e8e12ddffd54bfb6b3365aec2c31aa615
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>
include/linux/phy/phy.h