diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 9e491df6419c..81b257e18bb6 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -60,7 +60,7 @@ static int mthca_query_device(struct ib_device *ibdev, | |||
60 | struct ib_smp *in_mad = NULL; | 60 | struct ib_smp *in_mad = NULL; |
61 | struct ib_smp *out_mad = NULL; | 61 | struct ib_smp *out_mad = NULL; |
62 | int err = -ENOMEM; | 62 | int err = -ENOMEM; |
63 | struct mthca_dev* mdev = to_mdev(ibdev); | 63 | struct mthca_dev *mdev = to_mdev(ibdev); |
64 | 64 | ||
65 | u8 status; | 65 | u8 status; |
66 | 66 | ||
@@ -540,6 +540,9 @@ static struct ib_qp *mthca_create_qp(struct ib_pd *pd, | |||
540 | struct mthca_qp *qp; | 540 | struct mthca_qp *qp; |
541 | int err; | 541 | int err; |
542 | 542 | ||
543 | if (init_attr->create_flags) | ||
544 | return ERR_PTR(-EINVAL); | ||
545 | |||
543 | switch (init_attr->qp_type) { | 546 | switch (init_attr->qp_type) { |
544 | case IB_QPT_RC: | 547 | case IB_QPT_RC: |
545 | case IB_QPT_UC: | 548 | case IB_QPT_UC: |