]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix bit-wise and with zero
authorColin Ian King <colin.king@canonical.com>
Tue, 6 Apr 2021 16:53:46 +0000 (17:53 +0100)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 14 Apr 2021 18:02:58 +0000 (11:02 -0700)
commit047cb9ff95c6678dd0a8868657f4870a249888ec
treefa68ca98b7fbf66d2041d5eccf19457735f4e5cb
parente6bd6bf85250baa7d295f8ed0bfc90b4da218fae
net/mlx5: Fix bit-wise and with zero

The bit-wise and of the action field with MLX5_ACCEL_ESP_ACTION_DECRYPT
is incorrect as MLX5_ACCEL_ESP_ACTION_DECRYPT is zero and not intended
to be a bit-flag. Fix this by using the == operator as was originally
intended.

Addresses-Coverity: ("Logically dead code")
Fixes: 1982bee3c009 ("net/mlx5: IPsec, Refactor SA handle creation and destruction")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c