summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-02-28 12:58:22 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-01 18:50:58 +0100
commit4f3de46f7a57a8ecc16c7ef69c6917b3731a7c5f (patch)
tree1b464840d02d47f9592c657954fcfdfb466fdc7d /drivers
parentMAINTAINERS: Orphan usb/net/hso driver (diff)
downloadlinux-4f3de46f7a57a8ecc16c7ef69c6917b3731a7c5f.tar.xz
linux-4f3de46f7a57a8ecc16c7ef69c6917b3731a7c5f.zip
net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode
The call to asix_write_medium_mode is not updating the return code ret and yet ret is being checked for an error. Fix this by assigning ret to the return code from the call asix_write_medium_mode. Detected by CoverityScan, CID#1357148 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/asix_devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 6e98ede997d3..0dd510604118 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -346,7 +346,7 @@ static int ax88772_reset(struct usbnet *dev)
if (ret < 0)
goto out;
- asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT, 0);
+ ret = asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT, 0);
if (ret < 0)
goto out;