net/mlx5_core: Fix internal error detection conditions