net/ice: fix uninitialized scalar variable

Message ID 20200506104315.41600-1-qi.z.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ice: fix uninitialized scalar variable |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-testing success Testing PASS

Commit Message

Qi Zhang May 6, 2020, 10:43 a.m. UTC
  Fix coverity defect due to uninitialized scalar variable.

Coverity issue: 357763

Fixes: 47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Xiaolong Ye May 11, 2020, 2:59 a.m. UTC | #1
On 05/06, Qi Zhang wrote:
>Fix coverity defect due to uninitialized scalar variable.
>
>Coverity issue: 357763
>
>Fixes: 47d460d63233 ("net/ice: rework switch filter")
>Cc: stable@dpdk.org
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> drivers/net/ice/ice_switch_filter.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
>index 179430136..93f4ebdf0 100644
>--- a/drivers/net/ice/ice_switch_filter.c
>+++ b/drivers/net/ice/ice_switch_filter.c
>@@ -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);
>-- 
>2.13.6
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

Patch

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 179430136..93f4ebdf0 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -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);