wifi: iwlwifi: dvm: pair transport op-mode enter/leave

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
This commit is contained in:
Johannes Berg 2025-05-04 13:26:30 +03:00 committed by Miri Korenblit
parent d6bf0778f7
commit 6b340a694c

View 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 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
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: