Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568347

[PATCH] IB/cma: Fix reversed test

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH] IB/cma: Fix reversed test
Date 2017-01-27 14:20 +0100
Message-ID <t4eBA-4C9-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This test looks reverted.
We should log an error message only if 'ib_attach_mcast()' fails.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index cfefb941d729..175f62e5841e 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3838,7 +3838,7 @@ static int cma_ib_mc_handler(int status, struct ib_sa_multicast *multicast)
 	if (!status && id_priv->id.qp) {
 		status = ib_attach_mcast(id_priv->id.qp, &multicast->rec.mgid,
 					 be16_to_cpu(multicast->rec.mlid));
-		if (!status)
+		if (status)
 			pr_debug_ratelimited("RDMA CM: MULTICAST_ERROR: failed to attach QP. status %d\n",
 					     status);
 	}
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] IB/cma: Fix reversed test Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-01-27 14:20 +0100
  Re: [PATCH] IB/cma: Fix reversed test Doug Ledford <dledford@redhat.com> - 2017-01-27 20:40 +0100
  Re: [PATCH] IB/cma: Fix reversed test Doug Ledford <dledford@redhat.com> - 2017-01-28 01:10 +0100
    Re: [PATCH] IB/cma: Fix reversed test Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-28 08:10 +0100
      Re: [PATCH] IB/cma: Fix reversed test Majd Dibbiny <majd@mellanox.com> - 2017-01-28 14:10 +0100
    Re: [PATCH] IB/cma: Fix reversed test Majd Dibbiny <majd@mellanox.com> - 2017-01-28 14:10 +0100

csiph-web