Revert "usb: dwc3: Remove the checks of -ENOSYS"
This reverts commitdf22ecc41b
. If CONFIG_GENERIC_PHY is not enabled, then the devm_phy_get() returns -ENOSYS. Don't remove this check. Fixes:df22ecc41b
("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>
This commit is contained in:
Родитель
22fe2b3649
Коммит
fb119dcb97
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче