Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48c6b5c9 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo
Browse files

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: 16d3bb7b ("rsi: disable fw watchdog timer during reset")
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e1fd7cee
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -687,9 +687,10 @@ static int rsi_reset_card(struct rsi_hw *adapter)
	 */
	msleep(100);

	if (rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
	ret = rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
				       RSI_FW_WDT_DISABLE_REQ,
				     RSI_COMMON_REG_SIZE) < 0) {
				       RSI_COMMON_REG_SIZE);
	if (ret < 0) {
		rsi_dbg(ERR_ZONE, "Disabling firmware watchdog timer failed\n");
		goto fail;
	}