rsi_91x: 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: 4fd6c4762f ("rsi: roaming enhancements")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Gustavo A. R. Silva 2018-04-26 08:01:38 -05:00 коммит произвёл Kalle Valo
Родитель 60f36637bb
Коммит e1fd7ceec1
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -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;