Skip to content

Commit

Permalink
net/bnxt: fix boolean operator usage
Browse files Browse the repository at this point in the history
[ upstream commit 47b7076 ]

Use boolean AND operator instead of bitwise operator.

Coverity issue: 323488
Fixes: b42c15c ("net/bnxt: support trusted VF")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
Lance Richardson authored and bluca committed Nov 9, 2020
1 parent d97dce7 commit 25bce6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bnxt/bnxt_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
if (rc)
return rc;

if (BNXT_VF(bp) & !BNXT_VF_IS_TRUSTED(bp)) {
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
return -ENOTSUP;
}
Expand Down

0 comments on commit 25bce6c

Please sign in to comment.