Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: Remove the checks of -ENOSYS

Commit 57303488cd37d ("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: Kushagra Verma <kushagra765@outlook.com>
Link: https://lore.kernel.org/r/HK0PR01MB2801E19D4FE569545BB7592DF8A19@HK0PR01MB2801.apcprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kushagra Verma and committed by
Greg Kroah-Hartman
df22ecc4 1e073e3e

+2 -2
+2 -2
drivers/usb/dwc3/core.c
··· 1318 1318 dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy"); 1319 1319 if (IS_ERR(dwc->usb2_generic_phy)) { 1320 1320 ret = PTR_ERR(dwc->usb2_generic_phy); 1321 - if (ret == -ENOSYS || ret == -ENODEV) 1321 + if (ret == -ENODEV) 1322 1322 dwc->usb2_generic_phy = NULL; 1323 1323 else 1324 1324 return dev_err_probe(dev, ret, "no usb2 phy configured\n"); ··· 1327 1327 dwc->usb3_generic_phy = devm_phy_get(dev, "usb3-phy"); 1328 1328 if (IS_ERR(dwc->usb3_generic_phy)) { 1329 1329 ret = PTR_ERR(dwc->usb3_generic_phy); 1330 - if (ret == -ENOSYS || ret == -ENODEV) 1330 + if (ret == -ENODEV) 1331 1331 dwc->usb3_generic_phy = NULL; 1332 1332 else 1333 1333 return dev_err_probe(dev, ret, "no usb3 phy configured\n");