From: Bing Zhao Date: Fri, 12 Nov 2021 14:42:45 +0000 (+0200) Subject: vdpa/mlx5: fix mkey creation check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e9511a26e1c4fed566c3c2ea33ca895b7ab4f724;p=dpdk.git vdpa/mlx5: fix mkey creation check The return value of "mlx5_os_wrapped_mkey_create" is checked in the caller. A zero means success without any error. The typo in the if-condition should be fixed in case there is a misjudgment. Fixes: 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MR creation") Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Matan Azrad Reviewed-by: Chenbo Xia --- diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c index e65e4faa47..43a2b98255 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c @@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base, (void *)(uintptr_t)log_base, log_size, &priv->lm_mr); - if (!ret) { + if (ret) { DRV_LOG(ERR, "Failed to allocate wrapped MR for lm."); return -1; }