diff options
Diffstat (limited to 'drivers/infiniband/core/security.c')
-rw-r--r-- | drivers/infiniband/core/security.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c index feafdb961c48..59b2f96d986a 100644 --- a/drivers/infiniband/core/security.c +++ b/drivers/infiniband/core/security.c | |||
@@ -386,6 +386,9 @@ int ib_open_shared_qp_security(struct ib_qp *qp, struct ib_device *dev) | |||
386 | if (ret) | 386 | if (ret) |
387 | return ret; | 387 | return ret; |
388 | 388 | ||
389 | if (!qp->qp_sec) | ||
390 | return 0; | ||
391 | |||
389 | mutex_lock(&real_qp->qp_sec->mutex); | 392 | mutex_lock(&real_qp->qp_sec->mutex); |
390 | ret = check_qp_port_pkey_settings(real_qp->qp_sec->ports_pkeys, | 393 | ret = check_qp_port_pkey_settings(real_qp->qp_sec->ports_pkeys, |
391 | qp->qp_sec); | 394 | qp->qp_sec); |