Skip to content

Commit 71b5e40

Browse files
Dan Carpenterjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: fix an error code in iwl_mvm_mld_add_sta()
This error path should return -EINVAL instead of success. Fixes: 57974a5 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/75e4ea09-db58-462f-bd4e-5ad4e5e5dcb5@moroto.mountain Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 695bfba commit 71b5e40

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/wireless/intel/iwlwifi/mvm

drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,10 @@ int iwl_mvm_mld_add_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
707707
rcu_dereference_protected(mvm_sta->link[link_id],
708708
lockdep_is_held(&mvm->mutex));
709709

710-
if (WARN_ON(!link_conf || !mvm_link_sta))
710+
if (WARN_ON(!link_conf || !mvm_link_sta)) {
711+
ret = -EINVAL;
711712
goto err;
713+
}
712714

713715
ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, link_conf,
714716
mvm_link_sta);

0 commit comments

Comments
 (0)