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: 7dfee4b1d79e ("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>
This commit is contained in:
parent
b7f86258a2
commit
82c3ba31c3
@ -850,7 +850,7 @@ mlx5_fpga_ipsec_release_sa_ctx(struct mlx5_fpga_ipsec_sa_ctx *sa_ctx)
|
||||
return;
|
||||
}
|
||||
|
||||
if (sa_ctx->fpga_xfrm->accel_xfrm.attrs.action &
|
||||
if (sa_ctx->fpga_xfrm->accel_xfrm.attrs.action ==
|
||||
MLX5_ACCEL_ESP_ACTION_DECRYPT)
|
||||
ida_free(&fipsec->halloc, sa_ctx->sa_handle);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user