diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_srq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index 4e671e00e42b..0cfd15802217 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c | |||
@@ -358,6 +358,8 @@ int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
358 | return -EINVAL; | 358 | return -EINVAL; |
359 | 359 | ||
360 | if (attr_mask & IB_SRQ_LIMIT) { | 360 | if (attr_mask & IB_SRQ_LIMIT) { |
361 | if (attr->srq_limit > srq->max) | ||
362 | return -EINVAL; | ||
361 | ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit, &status); | 363 | ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit, &status); |
362 | if (ret) | 364 | if (ret) |
363 | return ret; | 365 | return ret; |