Commit 6b340a69 authored by Johannes Berg's avatar Johannes Berg Committed by Miri Korenblit
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.714c3517548b.I49557e7ba8c03be2b558cc9fb5efa2a9fbab890e@changeid
parent d6bf0778
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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: