summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-10-16 20:28:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-25 12:16:14 +0200
commit48984949e51d10e57fe17e1c444508734ad89467 (patch)
tree8fbc8f14eb90c8b62b4c25b42a14e8fadd92d4bd /drivers/net/usb
parent394c8055fd0e7fd50b9a6d1a3ceae018a8ca10d6 (diff)
downloadlinux-stable-48984949e51d10e57fe17e1c444508734ad89467.tar.gz
linux-stable-48984949e51d10e57fe17e1c444508734ad89467.tar.bz2
linux-stable-48984949e51d10e57fe17e1c444508734ad89467.zip
net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
commit c53647a5df9e66dd9fedf240198e1fe50d88c286 upstream. Return a negative error code instead of success. Fixes: 2f7ca802bdae ("net: Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/147927f0-9ada-45cc-81ff-75a19dd30b76@moroto.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/smsc95xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 563ecd27b93e..17da42fe605c 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -897,7 +897,7 @@ static int smsc95xx_reset(struct usbnet *dev)
if (timeout >= 100) {
netdev_warn(dev->net, "timeout waiting for completion of Lite Reset\n");
- return ret;
+ return -ETIMEDOUT;
}
ret = smsc95xx_set_mac_address(dev);