[PATCH v2 50/54] net/e1000/base: fix uninitialized variable usage

Anatoly Burakov anatoly.burakov at intel.com
Tue Feb 4 16:10:56 CET 2025


From: Jakub Buchocki <101559614+jbuchocx at users.noreply.github.com>

Coverity has detected potential usage of uninitialized values inside the
array. Fix the warning by initializing array.

Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org

Signed-off-by: Jakub Buchocki <jakubx.buchocki at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/intel/e1000/base/e1000_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/e1000/base/e1000_vf.c b/drivers/net/intel/e1000/base/e1000_vf.c
index bb314e2f12..e0c95aa130 100644
--- a/drivers/net/intel/e1000/base/e1000_vf.c
+++ b/drivers/net/intel/e1000/base/e1000_vf.c
@@ -374,7 +374,7 @@ STATIC void e1000_write_msg_read_ack(struct e1000_hw *hw,
 void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
 				  u8 *mc_addr_list, u32 mc_addr_count)
 {
-	u32 msgbuf[E1000_VFMAILBOX_SIZE];
+	u32 msgbuf[E1000_VFMAILBOX_SIZE] = {0};
 	u16 *hash_list = (u16 *)&msgbuf[1];
 	u32 hash_value;
 	u32 i;
-- 
2.43.5



More information about the stable mailing list