From de6d0f59f0b5f5897bbc95c248cb5ee06df2ac4d Mon Sep 17 00:00:00 2001 From: Shijith Thotton Date: Mon, 10 Apr 2017 12:48:55 +0530 Subject: [PATCH] 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 --- 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 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; -- 2.20.1