diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_qp.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 47271be65b0f..e6fc4c02823f 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -667,6 +667,14 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
667 | goto bail; | 667 | goto bail; |
668 | } | 668 | } |
669 | 669 | ||
670 | if (init_attr->cap.max_send_sge + | ||
671 | init_attr->cap.max_recv_sge + | ||
672 | init_attr->cap.max_send_wr + | ||
673 | init_attr->cap.max_recv_wr == 0) { | ||
674 | ret = ERR_PTR(-EINVAL); | ||
675 | goto bail; | ||
676 | } | ||
677 | |||
670 | switch (init_attr->qp_type) { | 678 | switch (init_attr->qp_type) { |
671 | case IB_QPT_UC: | 679 | case IB_QPT_UC: |
672 | case IB_QPT_RC: | 680 | case IB_QPT_RC: |