RDMA/irdma: Fix return error sign from irdma_modify_qp
authorKamal Heib <kamalheib1@gmail.com>
Mon, 7 Jun 2021 22:15:43 +0000 (01:15 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 7 Jun 2021 23:21:10 +0000 (20:21 -0300)
There is a typo in the returned error code sign from irdma_modify_qp()
when the attr_mask is not supported - Fix it.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20210607221543.254144-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/verbs.c

index 65cb58cb32e1f6975e19a3ec83ac946e1cba8b2e..f813719015171a812a134c82f261a05609f92035 100644 (file)
@@ -1472,7 +1472,7 @@ int irdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
        unsigned long flags;
 
        if (attr_mask & ~IB_QP_ATTR_STANDARD_BITS)
-               return ~EOPNOTSUPP;
+               return -EOPNOTSUPP;
 
        ctx_info = &iwqp->ctx_info;
        offload_info = &iwqp->iwarp_info;