Initialize mail box command to request VF FLR. Data field was
uninitialized before as it was not required and caused the following
error during scan.

Reported by Coverity scan:
1384518 Uninitialized scalar variable

Fixes: cdb166963cae ("net/liquidio: add API for VF FLR")

Signed-off-by: Shijith Thotton <shijith.thot...@caviumnetworks.com>
---
 drivers/net/liquidio/base/lio_23xx_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c 
b/drivers/net/liquidio/base/lio_23xx_vf.c
index 6ff5b69..e30c20d 100644
--- a/drivers/net/liquidio/base/lio_23xx_vf.c
+++ b/drivers/net/liquidio/base/lio_23xx_vf.c
@@ -31,6 +31,8 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <string.h>
+
 #include <rte_ethdev.h>
 #include <rte_cycles.h>
 #include <rte_malloc.h>
@@ -382,7 +384,7 @@
 {
        struct lio_mbox_cmd mbox_cmd;
 
-       mbox_cmd.msg.mbox_msg64 = 0;
+       memset(&mbox_cmd, 0, sizeof(struct lio_mbox_cmd));
        mbox_cmd.msg.s.type = LIO_MBOX_REQUEST;
        mbox_cmd.msg.s.resp_needed = 0;
        mbox_cmd.msg.s.cmd = LIO_VF_FLR_REQUEST;
-- 
1.8.3.1

Reply via email to