From: Kamal Heib Date: Mon, 30 Jul 2018 18:56:44 +0000 (+0300) Subject: RDMA/ipoib: Fix check for return code from ib_create_srq X-Git-Tag: v5.15~8129^2~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e586e1e1b73f3dc020b82e6fc42c7789b7d0e95d;p=platform%2Fkernel%2Flinux-starfive.git RDMA/ipoib: Fix check for return code from ib_create_srq Make sure to check for "-EOPNOTSUPP" instead of "-ENOSYS" which is the return code from ib_create_srq() in case that it not supported. Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 8b44f33..8ef50e4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -1560,7 +1560,7 @@ static void ipoib_cm_create_srq(struct net_device *dev, int max_sge) priv->cm.srq = ib_create_srq(priv->pd, &srq_init_attr); if (IS_ERR(priv->cm.srq)) { - if (PTR_ERR(priv->cm.srq) != -ENOSYS) + if (PTR_ERR(priv->cm.srq) != -EOPNOTSUPP) pr_warn("%s: failed to allocate SRQ, error %ld\n", priv->ca->name, PTR_ERR(priv->cm.srq)); priv->cm.srq = NULL;