iwlwifi: mvm: fix accessing fw_id_to_mac_id

Access should be by rcu_dereference. Issue was found by sparse.

Fixes: 65e254821c ("iwlwifi: mvm: use firmware station PM notification for AP_LINK_PS")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Sara Sharon 2017-01-26 14:43:32 +02:00 committed by Luca Coelho
parent 6be3b6cce1
commit a956002941

View File

@ -2401,7 +2401,7 @@ void iwl_mvm_sta_pm_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
return;
rcu_read_lock();
sta = mvm->fw_id_to_mac_id[notif->sta_id];
sta = rcu_dereference(mvm->fw_id_to_mac_id[notif->sta_id]);
if (WARN_ON(IS_ERR_OR_NULL(sta))) {
rcu_read_unlock();
return;