summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>2022-06-15 04:07:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-21 11:43:43 +0300
commitfb119dcb97f43cf2a6164094209a08e7e6cd6f08 (patch)
tree06061db2fc7a98c9340498c403dedae669b52f1c /drivers/usb/dwc3/core.c
parent22fe2b36493f195b3f705043877f6c1456f1fd90 (diff)
downloadlinux-fb119dcb97f43cf2a6164094209a08e7e6cd6f08.tar.xz
Revert "usb: dwc3: Remove the checks of -ENOSYS"
This reverts commit df22ecc41b54def624735b83784857e708bd1502. If CONFIG_GENERIC_PHY is not enabled, then the devm_phy_get() returns -ENOSYS. Don't remove this check. Fixes: df22ecc41b54 ("usb: dwc3: Remove the checks of -ENOSYS") Cc: Kushagra Verma <kushagra765@outlook.com> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/eb1df7ef954b5af093c0528982db52a41df18615.1655255152.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 1bd87da0bda7..cb8742f2a4b0 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1318,7 +1318,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy");
if (IS_ERR(dwc->usb2_generic_phy)) {
ret = PTR_ERR(dwc->usb2_generic_phy);
- if (ret == -ENODEV)
+ if (ret == -ENOSYS || ret == -ENODEV)
dwc->usb2_generic_phy = NULL;
else
return dev_err_probe(dev, ret, "no usb2 phy configured\n");
@@ -1327,7 +1327,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
dwc->usb3_generic_phy = devm_phy_get(dev, "usb3-phy");
if (IS_ERR(dwc->usb3_generic_phy)) {
ret = PTR_ERR(dwc->usb3_generic_phy);
- if (ret == -ENODEV)
+ if (ret == -ENOSYS || ret == -ENODEV)
dwc->usb3_generic_phy = NULL;
else
return dev_err_probe(dev, ret, "no usb3 phy configured\n");