Don't return -ENODEV if of_phy_provider_lookup() fails instead propagate the error. So errors like -EPROBE_DEFER are propagated correctly. Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx> --- drivers/phy/phy-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index ef7bd76648..8a57bd1aa9 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -317,7 +317,7 @@ struct phy *of_phy_get_by_phandle(struct device_d *dev, const char *phandle, phy_provider = of_phy_provider_lookup(np); if (IS_ERR(phy_provider)) { - return ERR_PTR(-ENODEV); + return ERR_CAST(phy_provider); } return phy_provider->of_xlate(phy_provider->dev, NULL); -- 2.30.2