diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-01-16 03:28:13 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-19 18:14:04 -0500 |
commit | 990acea616e99355703b503c1e50fb9c7ddff6b9 (patch) | |
tree | 8b76b0aa9cd9c2b4cd0fe637e7624ba92e829c76 /drivers/infiniband | |
parent | 2f85d24e604c1532723c4b5791816b533baed2c3 (diff) |
IB/cm: Fix missing unlock on error in cm_init_qp_rtr_attr()
Add the missing unlock before return from function cm_init_qp_rtr_attr()
in the error handling case.
Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures")
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/cm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index c6d543c3ef52..0601b9daf840 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -3526,8 +3526,10 @@ static int cm_init_qp_rtr_attr(struct cm_id_private *cm_id_priv, | |||
3526 | *qp_attr_mask = IB_QP_STATE | IB_QP_AV | IB_QP_PATH_MTU | | 3526 | *qp_attr_mask = IB_QP_STATE | IB_QP_AV | IB_QP_PATH_MTU | |
3527 | IB_QP_DEST_QPN | IB_QP_RQ_PSN; | 3527 | IB_QP_DEST_QPN | IB_QP_RQ_PSN; |
3528 | qp_attr->ah_attr = cm_id_priv->av.ah_attr; | 3528 | qp_attr->ah_attr = cm_id_priv->av.ah_attr; |
3529 | if (!cm_id_priv->av.valid) | 3529 | if (!cm_id_priv->av.valid) { |
3530 | spin_unlock_irqrestore(&cm_id_priv->lock, flags); | ||
3530 | return -EINVAL; | 3531 | return -EINVAL; |
3532 | } | ||
3531 | if (cm_id_priv->av.ah_attr.vlan_id != 0xffff) { | 3533 | if (cm_id_priv->av.ah_attr.vlan_id != 0xffff) { |
3532 | qp_attr->vlan_id = cm_id_priv->av.ah_attr.vlan_id; | 3534 | qp_attr->vlan_id = cm_id_priv->av.ah_attr.vlan_id; |
3533 | *qp_attr_mask |= IB_QP_VID; | 3535 | *qp_attr_mask |= IB_QP_VID; |