Skip to contentSkip to conversation

net/bnxt: fix incorrect assignment

PATCH Applied Ajit Khaparde 2 participants 2 messages Nov 12, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix incorrect assignment

From: Mike Baucom <[email protected]>

Use comparison operator instead of incorrectly using the assignment operator.

Coverity issue: 363566
Coverity issue: 363577

Fixes 42c40f8902f7 ("net/bnxt: consolidate template table processing")
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +2 -2
index 29643232d8..429e7fcfee 100644
@@ -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;
 }
Signature · 1 line
2.21.1 (Apple Git-122.3)