From: Shijith Thotton Date: Mon, 10 Apr 2017 07:18:55 +0000 (+0530) Subject: net/liquidio/base: fix mbox command initialization X-Git-Tag: spdx-start~3616 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=de6d0f59f0b5f5897bbc95c248cb5ee06df2ac4d;p=dpdk.git net/liquidio/base: fix mbox command initialization 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. Coverity issue: 1384518 Fixes: cdb166963cae ("net/liquidio: add API for VF FLR") Signed-off-by: Shijith Thotton --- diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index 6ff5b69f97..e30c20dce2 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 + #include #include #include @@ -382,7 +384,7 @@ cn23xx_vf_ask_pf_to_do_flr(struct lio_device *lio_dev) { 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;