From: Christophe Jaillet Date: Fri, 27 Jan 2017 13:15:35 +0000 (+0100) Subject: IB/cma: Fix reversed test X-Git-Tag: MMI-PSA29.97-13-9~6131^2~56 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3dd3a48a5f6ce433e06863d311dfdd57a26bf67;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git IB/cma: Fix reversed test This test looks reverted. We should log an error message only if 'ib_attach_mcast()' fails. Signed-off-by: Christophe JAILLET Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index f9133c7606a8..7cb01a9463da 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -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); }