Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dad3e0a authored by Luca Coelho's avatar Luca Coelho
Browse files

iwlwifi: remove useless iwl_free_nvm_data() function



This function just calls kfree(), so it only obscures the code without
bringing any benefits.  Remove it.

Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent d98d6fb9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1513,7 +1513,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
out_free_eeprom_blob:
out_free_eeprom_blob:
	kfree(priv->eeprom_blob);
	kfree(priv->eeprom_blob);
out_free_eeprom:
out_free_eeprom:
	iwl_free_nvm_data(priv->nvm_data);
	kfree(priv->nvm_data);
out_free_hw:
out_free_hw:
	ieee80211_free_hw(priv->hw);
	ieee80211_free_hw(priv->hw);
out:
out:
@@ -1532,7 +1532,7 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
	iwl_tt_exit(priv);
	iwl_tt_exit(priv);


	kfree(priv->eeprom_blob);
	kfree(priv->eeprom_blob);
	iwl_free_nvm_data(priv->nvm_data);
	kfree(priv->nvm_data);


	/*netif_stop_queue(dev); */
	/*netif_stop_queue(dev); */
	flush_workqueue(priv->workqueue);
	flush_workqueue(priv->workqueue);
+0 −9
Original line number Original line Diff line number Diff line
@@ -121,15 +121,6 @@ struct iwl_nvm_data *
iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg,
iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg,
		      const u8 *eeprom, size_t eeprom_size);
		      const u8 *eeprom, size_t eeprom_size);


/**
 * iwl_free_nvm_data - free NVM data
 * @data: the data to free
 */
static inline void iwl_free_nvm_data(struct iwl_nvm_data *data)
{
	kfree(data);
}

int iwl_nvm_check_version(struct iwl_nvm_data *data,
int iwl_nvm_check_version(struct iwl_nvm_data *data,
			  struct iwl_trans *trans);
			  struct iwl_trans *trans);


+1 −1
Original line number Original line Diff line number Diff line
@@ -849,7 +849,7 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
	iwl_phy_db_free(mvm->phy_db);
	iwl_phy_db_free(mvm->phy_db);
	mvm->phy_db = NULL;
	mvm->phy_db = NULL;


	iwl_free_nvm_data(mvm->nvm_data);
	kfree(mvm->nvm_data);
	for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
	for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++)
		kfree(mvm->nvm_sections[i].data);
		kfree(mvm->nvm_sections[i].data);