net/bnxt: fix assignment instead of comparison
authorMike Baucom <michael.baucom@broadcom.com>
Thu, 12 Nov 2020 15:29:45 +0000 (07:29 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:26 +0000 (19:43 +0100)
Use comparison operator instead of incorrectly using the assignment
operator.

Coverity issue: 363566, 36357
Fixes: 42c40f8902f7 ("net/bnxt: consolidate template table processing")

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c

index 2964323..429e7fc 100644 (file)
@@ -2522,7 +2522,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
        tbls = ulp_mapper_tbl_list_get(parms, tid, &num_tbls);
        if (!tbls || !num_tbls) {
                BNXT_TF_DBG(ERR, "No %s tables for %d:%d\n",
-                           (parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
+                           (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
                            "class" : "action", parms->dev_id, tid);
                return -EINVAL;
        }
@@ -2569,7 +2569,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
        return rc;
 error:
        BNXT_TF_DBG(ERR, "%s tables failed creation for %d:%d\n",
-                   (parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
+                   (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
                    "class" : "action", parms->dev_id, tid);
        return rc;
 }