Skip to contentSkip to conversation

rsi_91x_mac80211: fix structurally dead code

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Apr 26, 2018 – Apr 30, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rsi_91x_mac80211: fix structurally dead code

Function rsi_hal_key_config returns before reaching code at line 922 if (status), hence this code is structurally dead.

Fix this by storing the value returned by rsi_hal_load_key into _status_ for its further evaluation and use.

Addresses-Coverity-ID: 1468409 ("Structurally dead code")

Fixes 4fd6c4762f37 ("rsi: roaming enhancements")
---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/rsi/rsi_91x_mac80211.c +8 -8
index 766d874..80e7f4f 100644
@@ -911,14 +911,14 @@ static int rsi_hal_key_config(struct ieee80211_hw *hw,
 		}
 	}
 
-	return rsi_hal_load_key(adapter->priv,
-				key->key,
-				key->keylen,
-				key_type,
-				key->keyidx,
-				key->cipher,
-				sta_id,
-				vif);
+	status = rsi_hal_load_key(adapter->priv,
+				  key->key,
+				  key->keylen,
+				  key_type,
+				  key->keyidx,
+				  key->cipher,
+				  sta_id,
+				  vif);
 	if (status)
 		return status;
 
Signature · 1 line
2.7.4
#1 lore raw

Re: rsi_91x: fix structurally dead code

Quoted 9 lines · Gustavo A. R. Silva

Function rsi_hal_key_config returns before reaching code at line 922 if (status), hence this code is structurally dead.

Fix this by storing the value returned by rsi_hal_load_key into _status_ for its further evaluation and use.

Addresses-Coverity-ID: 1468409 ("Structurally dead code")

Fixes 4fd6c4762f37 ("rsi: roaming enhancements")

Patch applied to wireless-drivers-next.git, thanks.

e1fd7ceec194 rsi_91x: fix structurally dead code

Signature · 3 lines
https://patchwork.kernel.org/patch/10365997/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches