net/mlx5: fix invalid error check