This patch fixes the variable 'total_pages' may be used uninitialized. Fixes: 80317ff6adfd ("net/bnxt/tf_core: support Thor2") Cc: sta...@dpdk.org
Signed-off-by: Wenwu Ma <wenwux...@intel.com> --- drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c index 1770069295..3aed78dbeb 100644 --- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c +++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c @@ -439,7 +439,7 @@ static int alloc_link_pbl(struct tfc_ts_mem_cfg *mem_cfg, uint32_t page_size, char mz_name[RTE_MEMZONE_NAMESIZE]; int mz_size; uint64_t total_size; - uint32_t total_pages; + uint32_t total_pages = 0; /* tf_em_size_page_tbl_lvl */ rc = num_pages_get(mem_cfg, page_size); -- 2.34.1