]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: dvm: pair transport op-mode enter/leave
authorJohannes Berg <johannes.berg@intel.com>
Sun, 4 May 2025 10:26:30 +0000 (13:26 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 7 May 2025 03:08:01 +0000 (06:08 +0300)
If there's a failure and the op-mode didn't actually fully
initialize, it should leave the transport again. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.714c3517548b.I49557e7ba8c03be2b558cc9fb5efa2a9fbab890e@changeid
drivers/net/wireless/intel/iwlwifi/dvm/main.c

index 1d811b60162b93b805c3390dc36555b89113952d..38e66e694d528e2ec8302a4f0c8c28746ce99b90 100644 (file)
@@ -1380,14 +1380,14 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
 
        err = iwl_trans_start_hw(priv->trans);
        if (err)
-               goto out_free_hw;
+               goto out_leave_trans;
 
        /* Read the EEPROM */
        err = iwl_read_eeprom(priv->trans, &priv->eeprom_blob,
                              &priv->eeprom_blob_size);
        if (err) {
                IWL_ERR(priv, "Unable to init EEPROM\n");
-               goto out_free_hw;
+               goto out_leave_trans;
        }
 
        /* Reset chip to save power until we load uCode during "up". */
@@ -1503,6 +1503,8 @@ out_free_eeprom_blob:
        kfree(priv->eeprom_blob);
 out_free_eeprom:
        kfree(priv->nvm_data);
+out_leave_trans:
+       iwl_trans_op_mode_leave(priv->trans);
 out_free_hw:
        ieee80211_free_hw(priv->hw);
 out: