event/dlb: fix accessing uninitialized variables
authorTimothy McDaniel <timothy.mcdaniel@intel.com>
Wed, 3 Feb 2021 18:12:21 +0000 (12:12 -0600)
committerJerin Jacob <jerinj@marvell.com>
Thu, 4 Feb 2021 12:25:43 +0000 (13:25 +0100)
This patch updates the PMD to initialize response fields
prior to calling into the PF layer.

Coverity issue: 366200, 366202, 366205
Fixes: eb14a3421afd ("event/dlb: add eventdev start")
Fixes: f0073621940c ("event/dlb: add eventdev stop and close")
Cc: stable@dpdk.org
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
drivers/event/dlb/dlb.c

index 64e6df7..8b26d1d 100644 (file)
@@ -1847,7 +1847,7 @@ dlb_hw_create_dir_queue(struct dlb_eventdev *dlb, int32_t qm_port_id)
 {
        struct dlb_hw_dev *handle = &dlb->qm_instance;
        struct dlb_create_dir_queue_args cfg;
-       struct dlb_cmd_response response;
+       struct dlb_cmd_response response = {0};
        int32_t ret;
 
        cfg.response = (uintptr_t)&response;
@@ -3573,7 +3573,7 @@ dlb_get_ldb_queue_depth(struct dlb_eventdev *dlb,
 {
        struct dlb_hw_dev *handle = &dlb->qm_instance;
        struct dlb_get_ldb_queue_depth_args cfg;
-       struct dlb_cmd_response response;
+       struct dlb_cmd_response response = {0};
        int ret;
 
        cfg.queue_id = queue->qm_queue.id;
@@ -3595,7 +3595,7 @@ dlb_get_dir_queue_depth(struct dlb_eventdev *dlb,
 {
        struct dlb_hw_dev *handle = &dlb->qm_instance;
        struct dlb_get_dir_queue_depth_args cfg;
-       struct dlb_cmd_response response;
+       struct dlb_cmd_response response = {0};
        int ret;
 
        cfg.queue_id = queue->qm_queue.id;