net/hns3: fix build with gcov

meson build -Db_coverage=true
ninja -C build

../drivers/net/hns3/hns3_ethdev.c:2856:22: warning: ‘cfg.umv_space’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
 2856 |  pf->wanted_umv_size = cfg.umv_space;

Fix compiling warnings using gcc 10.3.1.

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
This commit is contained in:
Dongdong Liu 2022-09-30 15:22:08 +08:00 committed by Andrew Rybchenko
parent 1042ed401f
commit 38dc579e0f

View File

@ -2808,6 +2808,7 @@ hns3_get_board_configuration(struct hns3_hw *hw)
struct hns3_cfg cfg;
int ret;
memset(&cfg, 0, sizeof(cfg));
ret = hns3_get_board_cfg(hw, &cfg);
if (ret) {
PMD_INIT_LOG(ERR, "get board config failed %d", ret);