linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] wifi: iwlwifi: mvm: fix an error code in iwl_mvm_alloc_sta_after_restart()
@ 2024-08-02  4:27 Ma Ke
  2024-08-02  5:09 ` Dan Carpenter
  0 siblings, 1 reply; 7+ messages in thread
From: Ma Ke @ 2024-08-02  4:27 UTC (permalink / raw)
  To: miriam.rachel.korenblit, kvalo, johannes.berg, gregory.greenman,
	benjamin.berg, daniel.gabay, make24, dan.carpenter
  Cc: linux-wireless, linux-kernel

This error path should return -EINVAL instead of success.

Fixes: 57974a55d995 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
index d5a204e52076..477239a1ed83 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
@@ -644,12 +644,12 @@ static int iwl_mvm_alloc_sta_after_restart(struct iwl_mvm *mvm,
 						  lockdep_is_held(&mvm->mutex));
 
 		if (!link_conf)
-			continue;
+			return -EINVAL;
 
 		mvm_link = mvmvif->link[link_conf->link_id];
 
 		if (!mvm_link || !mvm_link_sta)
-			continue;
+			return -EINVAL;
 
 		sta_id = mvm_link_sta->sta_id;
 		ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-23  9:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02  4:27 [PATCH RESEND] wifi: iwlwifi: mvm: fix an error code in iwl_mvm_alloc_sta_after_restart() Ma Ke
2024-08-02  5:09 ` Dan Carpenter
2024-08-23  3:04   ` Ma Ke
2024-08-23  5:56     ` Kalle Valo
2024-08-23  9:03     ` Dan Carpenter
2024-08-23  9:14       ` Dan Carpenter
2024-08-23  9:29       ` Berg, Benjamin

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).