diff mbox series

event/dlb: fix accessing uninitialized variables

Message ID 1614023347-5873-1-git-send-email-timothy.mcdaniel@intel.com (mailing list archive)
State New
Headers show
Series event/dlb: fix accessing uninitialized variables | expand

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Timothy McDaniel Feb. 22, 2021, 7:49 p.m. UTC
This patch updates the PMD to initialize response fields
prior to calling into the PF layer.

Coverity issue: 366187, 366186, 366184, 366166, 366159,
		366158, 366153, 366145, 366127, 366125, 366120
Fixes: 8bb077f44ef2 ("event/dlb: add port unlink and unlinks in progress")
Fixes: 6a89b28f8163 ("event/dlb: add port link")
Fixes: eb14a3421afd ("event/dlb: add eventdev start")
Fixes: b94c709decbe ("event/dlb: add infos get and configure")
Fixes: f7a9172f36b4 ("event/dlb: add queue setup")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 8b26d1d..18bd19c 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -382,7 +382,7 @@  struct process_local_port_data
 dlb_ldb_credit_pool_create(struct dlb_hw_dev *handle)
 {
 	struct dlb_create_ldb_pool_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	if (handle == NULL)
@@ -414,7 +414,7 @@  struct process_local_port_data
 dlb_dir_credit_pool_create(struct dlb_hw_dev *handle)
 {
 	struct dlb_create_dir_pool_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	if (handle == NULL)
@@ -447,7 +447,7 @@  struct process_local_port_data
 {
 	int ret = 0;
 	struct dlb_create_sched_domain_args *config_params;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 
 	if (resources_asked == NULL) {
 		DLB_LOG_ERR("dlb: dlb_create NULL parameter\n");
@@ -711,7 +711,7 @@  struct process_local_port_data
 			       uint16_t qm_qid)
 {
 	struct dlb_unmap_qid_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 
 	if (handle == NULL)
@@ -841,7 +841,7 @@  struct process_local_port_data
 	struct dlb_eventdev *dlb;
 	struct dlb_hw_dev *handle;
 	struct dlb_pending_port_unmaps_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	RTE_SET_USED(dev);
@@ -1253,7 +1253,7 @@  struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_create_ldb_queue_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 	uint32_t qm_qid;
 	int sched_type = -1;
@@ -1309,7 +1309,7 @@  struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_sn_allocation_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.group = group;
@@ -1330,7 +1330,7 @@  struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_set_sn_allocation_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.num = num;
@@ -1352,7 +1352,7 @@  struct process_local_port_data
 {
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_get_sn_occupancy_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret;
 
 	cfg.group = group;
@@ -1893,7 +1893,7 @@  static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)
 			   uint8_t priority)
 {
 	struct dlb_map_qid_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int32_t ret;
 
 	if (handle == NULL)
@@ -2121,7 +2121,7 @@  static int dlb_num_dir_queues_setup(struct dlb_eventdev *dlb)
 	struct dlb_eventdev *dlb = dlb_pmd_priv(dev);
 	struct dlb_hw_dev *handle = &dlb->qm_instance;
 	struct dlb_start_domain_args cfg;
-	struct dlb_cmd_response response;
+	struct dlb_cmd_response response = {0};
 	int ret, i;
 
 	rte_spinlock_lock(&dlb->qm_instance.resource_lock);