LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] rsi_91x_mac80211: fix structurally dead code
@ 2018-04-26 13:01 Gustavo A. R. Silva
2018-04-30 10:33 ` rsi_91x: " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-04-26 13:01 UTC (permalink / raw)
To: Prameela Rani Garnepudi, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 766d874..80e7f4f 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -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;
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: rsi_91x: fix structurally dead code
2018-04-26 13:01 [PATCH] rsi_91x_mac80211: fix structurally dead code Gustavo A. R. Silva
@ 2018-04-30 10:33 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-04-30 10:33 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Prameela Rani Garnepudi, linux-wireless, netdev, linux-kernel,
Gustavo A. R. Silva
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> 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")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Patch applied to wireless-drivers-next.git, thanks.
e1fd7ceec194 rsi_91x: fix structurally dead code
--
https://patchwork.kernel.org/patch/10365997/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-30 10:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 13:01 [PATCH] rsi_91x_mac80211: fix structurally dead code Gustavo A. R. Silva
2018-04-30 10:33 ` rsi_91x: " Kalle Valo
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).