diff mbox series

[11/12] wifi: iwlwifi: mvm: check for iwl_mvm_mld_update_sta() errors

Message ID 20230921110727.a9496c232d48.I74adaa8f3c6fd3252348e79f18605246936ef27d@changeid
State New
Headers show
Series wifi: iwlwifi: updates - 2023-09-21 | expand

Commit Message

Greenman, Gregory Sept. 21, 2023, 8:58 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

The return value of this function is assigned, but then unused.
Check for errors here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
index 4e9d19eb31f1..1464aad039e1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
@@ -697,6 +697,8 @@  int iwl_mvm_mld_add_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 
 	/* at this stage sta link pointers are already allocated */
 	ret = iwl_mvm_mld_update_sta(mvm, vif, sta);
+	if (ret)
+		goto err;
 
 	for_each_sta_active_link(vif, sta, link_sta, link_id) {
 		struct ieee80211_bss_conf *link_conf =