summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rsi
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-04-26 15:13:24 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-04-30 12:33:44 +0200
commit48c6b5c9c1180b7f8b35edeaef9b3aa3e3b6c9d5 (patch)
tree2333df8a6d2cbec45d2fd555507b205f9fa34282 /drivers/net/wireless/rsi
parentrsi_91x: fix structurally dead code (diff)
downloadlinux-48c6b5c9c1180b7f8b35edeaef9b3aa3e3b6c9d5.tar.xz
linux-48c6b5c9c1180b7f8b35edeaef9b3aa3e3b6c9d5.zip
rsi_91x: fix uninitialized variable
There is a potential execution path in which variable ret is returned without being properly initialized previously. Fix this by storing the value returned by function rsi_usb_master_reg_write into _ret_. Addresses-Coverity-ID: 1468407 ("Uninitialized scalar variable") Fixes: 16d3bb7b2f37 ("rsi: disable fw watchdog timer during reset") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_usb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index b065438f51b2..6ce6b754df12 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -687,9 +687,10 @@ static int rsi_reset_card(struct rsi_hw *adapter)
*/
msleep(100);
- if (rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
- RSI_FW_WDT_DISABLE_REQ,
- RSI_COMMON_REG_SIZE) < 0) {
+ ret = rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
+ RSI_FW_WDT_DISABLE_REQ,
+ RSI_COMMON_REG_SIZE);
+ if (ret < 0) {
rsi_dbg(ERR_ZONE, "Disabling firmware watchdog timer failed\n");
goto fail;
}