Skip to content

Commit

Permalink
RDMA/providers: Fix return value from create_srq callbacks
Browse files Browse the repository at this point in the history
The proper return code is "-EOPNOTSUPP" when the create_srq() callback
is not supported.

Signed-off-by: Kamal Heib <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
Kamalheib authored and jgunthorpe committed Jul 31, 2018
1 parent f95ccff commit 8380b74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/bnxt_re/ib_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,
}

if (srq_init_attr->srq_type != IB_SRQT_BASIC) {
rc = -ENOTSUPP;
rc = -EOPNOTSUPP;
goto exit;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mthca/mthca_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static struct ib_srq *mthca_create_srq(struct ib_pd *pd,
int err;

if (init_attr->srq_type != IB_SRQT_BASIC)
return ERR_PTR(-ENOSYS);
return ERR_PTR(-EOPNOTSUPP);

srq = kmalloc(sizeof *srq, GFP_KERNEL);
if (!srq)
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rdmavt/srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct ib_srq *rvt_create_srq(struct ib_pd *ibpd,
struct ib_srq *ret;

if (srq_init_attr->srq_type != IB_SRQT_BASIC)
return ERR_PTR(-ENOSYS);
return ERR_PTR(-EOPNOTSUPP);

if (srq_init_attr->attr.max_sge == 0 ||
srq_init_attr->attr.max_sge > dev->dparms.props.max_srq_sge ||
Expand Down

0 comments on commit 8380b74

Please sign in to comment.