From 9c6689546126cfea141ba2e1526812a85c8dca4e Mon Sep 17 00:00:00 2001 From: William Wu Date: Wed, 26 Dec 2018 14:21:33 +0800 Subject: [PATCH] phy: rockchip-inno-combphy: fix error codes in rockchip_combphy_xlate Return ERR_PTR(-ENODEV) if rockchip_combphy_xlate fails to set phy type. This fixes the usb dwc3 controller probe fail if the phy type has been set to PCIe. With this patch, the rk1808 can support PCIe and USB 2.0 at the same time. Change-Id: I1cd58f720cb361e606f5e2ac761b9ca71ddaa67e Signed-off-by: William Wu --- drivers/phy/rockchip/phy-rockchip-inno-combphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-combphy.c b/drivers/phy/rockchip/phy-rockchip-inno-combphy.c index 20180aecb6d5..c4d2a1e48720 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-combphy.c @@ -508,7 +508,7 @@ static struct phy *rockchip_combphy_xlate(struct device *dev, if (priv->phy_type != PHY_NONE && priv->phy_type != args->args[0]) { dev_err(dev, "type select %d overwriting phy type %d\n", args->args[0], priv->phy_type); - return ERR_PTR(-EINVAL); + return ERR_PTR(-ENODEV); } priv->phy_type = args->args[0];