diff mbox series

net/bnxt: fix incorrect assignment

Message ID 20201112152945.99066-1-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/bnxt: fix incorrect assignment | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Ajit Khaparde Nov. 12, 2020, 3:29 p.m. UTC
From: Mike Baucom <michael.baucom@broadcom.com>

Use comparison operator instead of incorrectly using the assignment
operator.

Coverity issue: 363566
Coverity issue: 363577
Fixes: 42c40f8902f7 ("net/bnxt: consolidate template table processing")
Cc: stable@dpdk.org

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ferruh Yigit Nov. 12, 2020, 6:20 p.m. UTC | #1
On 11/12/2020 3:29 PM, Ajit Khaparde wrote:
> From: Mike Baucom <michael.baucom@broadcom.com>
> 
> Use comparison operator instead of incorrectly using the assignment
> operator.
> 
> Coverity issue: 363566
> Coverity issue: 363577
> Fixes: 42c40f8902f7 ("net/bnxt: consolidate template table processing")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 29643232d8..429e7fcfee 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -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;
 }