[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170228115822.20485-1-colin.king@canonical.com>
Date: Tue, 28 Feb 2017 11:58:22 +0000
From: Colin King <colin.king@...onical.com>
To: "David S . Miller" <davem@...emloft.net>,
Robert Foss <robert.foss@...labora.com>,
Grant Grundler <grundler@...gle.com>,
allan <allan@...x.com.tw>,
Vincent Palatin <vpalatin@...omium.org>,
Jarod Wilson <jarod@...hat.com>,
Peter Chen <peter.chen@....com>, linux-usb@...r.kernel.org,
netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] net: usb: asix_devices: fix missing return code check on call to asix_write_medium_mode
From: Colin Ian King <colin.king@...onical.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@...onical.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
Powered by blists - more mailing lists