Message ID | 147927f0-9ada-45cc-81ff-75a19dd30b76@moroto.mountain (mailing list archive) |
---|---|
State | Accepted |
Commit | c53647a5df9e66dd9fedf240198e1fe50d88c286 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: usb: smsc95xx: Fix an error code in smsc95xx_reset() | expand |
On Mon, Oct 16, 2023 at 08:28:10PM +0300, Dan Carpenter wrote: > 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> Hi Dan It would be nice to use one of the linux/iopoll.h helpers, so avoiding problems like this. But this is a good minimal fix. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 16 Oct 2023 20:28:10 +0300 you wrote: > 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> > --- > drivers/net/usb/smsc95xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [net] net: usb: smsc95xx: Fix an error code in smsc95xx_reset() https://git.kernel.org/netdev/net/c/c53647a5df9e You are awesome, thank you!
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);
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> --- drivers/net/usb/smsc95xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)