]> Git Repo - J-linux.git/commitdiff
net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
authorDan Carpenter <[email protected]>
Mon, 16 Oct 2023 17:28:10 +0000 (20:28 +0300)
committerJakub Kicinski <[email protected]>
Wed, 18 Oct 2023 00:53:36 +0000 (17:53 -0700)
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 <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/usb/smsc95xx.c

index 563ecd27b93ea56441daf150aecfa2f51219e6cc..17da42fe605c3a5705e999a1128a195385d17d75 100644 (file)
@@ -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);
This page took 0.048284 seconds and 4 git commands to generate.