Re: [PATCH] wifi: iwlwifi: Fix uninitialized variable with __free()
From: Markus Elfring
Date: Wed Mar 12 2025 - 11:42:40 EST
…
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> @@ -556,8 +556,8 @@ iwl_dbgfs_vif_twt_setup_write(struct iwl_mld *mld, char *buf, size_t count,
> };
> struct ieee80211_vif *vif = data;
> struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
> + struct iwl_dhc_cmd *cmd __free(kfree) = NULL;
> struct iwl_dhc_twt_operation *dhc_twt_cmd;
> - struct iwl_dhc_cmd *cmd __free(kfree);
…
Can it be recommended to reduce the scope for the affected local variable instead?
https://elixir.bootlin.com/linux/v6.14-rc6/source/include/linux/cleanup.h#L129-L133
Regards,
Markus