lkml.org 
[lkml]   [2022]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] USB / dwc3: remove the use of -ENOSYS from core.c
From
Date
This patch removes the use of -ENOSYS as it is used when users try to call a
syscall that doesn't exist. So, we don't need to check if 'ret == -ENOSYS'.

Signed-off-by: Kushagra Verma <kushagra765@outlook.com>
---
drivers/usb/dwc3/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c78205c5e19f..3c1a877d5183 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1283,7 +1283,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 == -ENOSYS || ret == -ENODEV)
+ if (ret == -ENODEV)
dwc->usb2_generic_phy = NULL;
else
return dev_err_probe(dev, ret, "no usb2 phy configured\n");
@@ -1292,7 +1292,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 == -ENOSYS || ret == -ENODEV)
+ if (ret == -ENODEV)
dwc->usb3_generic_phy = NULL;
else
return dev_err_probe(dev, ret, "no usb3 phy configured\n");
--
2.36.1

\
 
 \ /
  Last update: 2022-05-17 16:53    [W:0.061 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site