IB/cma: Fix reversed test
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Fri, 27 Jan 2017 13:15:35 +0000 (14:15 +0100)
committerDoug Ledford <dledford@redhat.com>
Fri, 27 Jan 2017 19:29:20 +0000 (14:29 -0500)
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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c

index f9133c7606a89f5b70af9c00c72f048ba2e456af..7cb01a9463da44ae5bd7d8f045c623fd5eb69225 100644 (file)
@@ -3837,7 +3837,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);
        }