[1/3] net/bnxt: fix uninitialized variable
Checks
Commit Message
This patch fixes the variable 'total_pages' may be used uninitialized.
Fixes: 80317ff6adfd ("net/bnxt/tf_core: support Thor2")
Cc: stable@dpdk.org
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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);