提交 df22ecc4 编写于 作者: K Kushagra Verma 提交者: Greg Kroah-Hartman

usb: dwc3: Remove the checks of -ENOSYS

Commit 57303488 ("usb: dwc3: adapt dwc3 core to use Generic PHY
Framework") added if statements that check 'ret == -ENOSYS || ret ==
-ENODEV', but the function phy_get() which is called by devm_phy_get()
returns the phy driver or -ENODEV if the phy driver was not found. So,
remove the check of -ENOSYS in the if statements.
Signed-off-by: NKushagra Verma <kushagra765@outlook.com>
Link: https://lore.kernel.org/r/HK0PR01MB2801E19D4FE569545BB7592DF8A19@HK0PR01MB2801.apcprd01.prod.exchangelabs.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1e073e3e
...@@ -1318,7 +1318,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) ...@@ -1318,7 +1318,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy"); dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy");
if (IS_ERR(dwc->usb2_generic_phy)) { if (IS_ERR(dwc->usb2_generic_phy)) {
ret = PTR_ERR(dwc->usb2_generic_phy); ret = PTR_ERR(dwc->usb2_generic_phy);
if (ret == -ENOSYS || ret == -ENODEV) if (ret == -ENODEV)
dwc->usb2_generic_phy = NULL; dwc->usb2_generic_phy = NULL;
else else
return dev_err_probe(dev, ret, "no usb2 phy configured\n"); return dev_err_probe(dev, ret, "no usb2 phy configured\n");
...@@ -1327,7 +1327,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) ...@@ -1327,7 +1327,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
dwc->usb3_generic_phy = devm_phy_get(dev, "usb3-phy"); dwc->usb3_generic_phy = devm_phy_get(dev, "usb3-phy");
if (IS_ERR(dwc->usb3_generic_phy)) { if (IS_ERR(dwc->usb3_generic_phy)) {
ret = PTR_ERR(dwc->usb3_generic_phy); ret = PTR_ERR(dwc->usb3_generic_phy);
if (ret == -ENOSYS || ret == -ENODEV) if (ret == -ENODEV)
dwc->usb3_generic_phy = NULL; dwc->usb3_generic_phy = NULL;
else else
return dev_err_probe(dev, ret, "no usb3 phy configured\n"); return dev_err_probe(dev, ret, "no usb3 phy configured\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册