Skip to contentSkip to conversation

net/ice: fix uninitialized scalar variable

PATCH Applied Qi Zhang 2 participants 2 messages May 6, 2020 – May 11, 2020 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH 1/1 net/ice: fix uninitialized scalar variable

Fix coverity defect due to uninitialized scalar variable.

Coverity issue: 357763

Fixes 47d460d63233 ("net/ice: rework switch filter")
---
 drivers/net/ice/ice_switch_filter.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ice/ice_switch_filter.c +1 -0
index 179430136..93f4ebdf0 100644
@@ -1500,6 +1500,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		goto error;
 	}
 
+	memset(&rule_info, 0, sizeof(rule_info));
 	rule_info.tun_type = tun_type;
 
 	ret = ice_switch_check_action(actions, error);
Signature · 1 line
2.13.6
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 27 lines · Qi Zhang

Fix coverity defect due to uninitialized scalar variable.

Coverity issue: 357763

Fixes 47d460d63233 ("net/ice: rework switch filter")

---
drivers/net/ice/ice_switch_filter.c | 1 +

1 file changed, 1 insertion(+)
drivers/net/ice/ice_switch_filter.c +1 -0
index 179430136..93f4ebdf0 100644
@@ -1500,6 +1500,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		goto error;
 	}
 
+	memset(&rule_info, 0, sizeof(rule_info));
 	rule_info.tun_type = tun_type;
 
 	ret = ice_switch_check_action(actions, error);
Signature · 1 line
2.13.6

Applied to dpdk-next-net-intel, Thanks.