* [PATCH] net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode
@ 2017-02-28 11:58 Colin King
2017-03-01 17:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-02-28 11:58 UTC (permalink / raw)
To: David S . Miller, Robert Foss, Grant Grundler, allan,
Vincent Palatin, Jarod Wilson, Peter Chen, linux-usb, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/net/usb/asix_devices.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 6e98ede..0dd5106 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;
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode
2017-02-28 11:58 [PATCH] net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode Colin King
@ 2017-03-01 17:52 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-01 17:52 UTC (permalink / raw)
To: colin.king
Cc: robert.foss, grundler, allan, vpalatin, jarod, peter.chen,
linux-usb, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 28 Feb 2017 11:58:22 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-01 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 11:58 [PATCH] net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode Colin King
2017-03-01 17:52 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).