diff mbox series

[next] wifi: iwlwifi: mld: silence uninitialized variable warning

Message ID add9c9e2-3b44-4e0a-a4aa-7326f6425baf@stanley.mountain
State New
Headers show
Series [next] wifi: iwlwifi: mld: silence uninitialized variable warning | expand

Commit Message

Dan Carpenter March 21, 2025, 2:36 p.m. UTC
The "resp_len" isn't initliazed if iwl_dhc_resp_data() fails.

Fixes: b611cf6b57a8 ("wifi: iwlwifi: mld: add support for DHC_TOOLS_UMAC_GET_TAS_STATUS command")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/net/wireless/intel/iwlwifi/mld/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miri Korenblit March 31, 2025, 10:25 a.m. UTC | #1
> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@linaro.org>
> Sent: Friday, 21 March 2025 16:36
> To: Anjaneyulu, Pagadala Yesu <pagadala.yesu.anjaneyulu@intel.com>
> Cc: Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>; Berg,
> Johannes <johannes.berg@intel.com>; Berg, Benjamin
> <benjamin.berg@intel.com>; linux-wireless@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH next] wifi: iwlwifi: mld: silence uninitialized variable warning
> 
> The "resp_len" isn't initliazed if iwl_dhc_resp_data() fails.
> 
> Fixes: b611cf6b57a8 ("wifi: iwlwifi: mld: add support for
> DHC_TOOLS_UMAC_GET_TAS_STATUS command")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/net/wireless/intel/iwlwifi/mld/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> index 453ce2ba39d1..89d95e9b4f30 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> @@ -396,8 +396,8 @@ static ssize_t iwl_dbgfs_tas_get_status_read(struct
> iwl_mld *mld, char *buf,
>  		.data[0] = &cmd,
>  	};
>  	struct iwl_dhc_tas_status_resp *resp = NULL;
> +	u32 resp_len = 0;
>  	ssize_t pos = 0;
> -	u32 resp_len;
>  	u32 status;
>  	int ret;
> 
> --
> 2.47.2
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
index 453ce2ba39d1..89d95e9b4f30 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
@@ -396,8 +396,8 @@  static ssize_t iwl_dbgfs_tas_get_status_read(struct iwl_mld *mld, char *buf,
 		.data[0] = &cmd,
 	};
 	struct iwl_dhc_tas_status_resp *resp = NULL;
+	u32 resp_len = 0;
 	ssize_t pos = 0;
-	u32 resp_len;
 	u32 status;
 	int ret;