From: Siva Durga Prasad Paladugu Date: Wed, 21 Oct 2020 12:17:31 +0000 (+0200) Subject: usb: dwc3: Handle case where setup_phy is not needed X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=e7f9e1fca9b0563e5e83c5d2c5164bdda5948227;p=u-boot.git usb: dwc3: Handle case where setup_phy is not needed If CONFIG_PHY is not enabled then the dwc3_setup_phy() returns ENOTSUPP which can be still valid and intentional so modify error check to handle this -ENOTSUPP. The same error handling exists in drivers/usb/host/xhci-dwc3.c already added by commit d648a50c0a27 ("dwc3: move phy operation to core.c"). Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 36fa16ad4e..a936f71d2e 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -74,7 +74,7 @@ static int dwc3_generic_probe(struct udevice *dev, } rc = dwc3_setup_phy(dev, &priv->phys); - if (rc) + if (rc && rc != -ENOTSUPP) return rc; if (device_is_compatible(dev->parent, "rockchip,rk3399-dwc3"))