net/bnxt: fix uninitialized variable
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 30 Apr 2020 04:11:51 +0000 (21:11 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 20:27:39 +0000 (22:27 +0200)
Fix uninitialized variable error reported by coverity.

Coverity issue: 357771
Fixes: 69c410b8448d ("net/bnxt: support EM/EEM")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
drivers/net/bnxt/tf_core/tf_tbl.c

index 93f387e..d900c9c 100644 (file)
@@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
 {
        struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
        struct tf_em_table *tbl;
-       int rc;
+       int rc = 0;
        int i;
 
        for (i = KEY0_TABLE; i < MAX_TABLE; i++) {