aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/amso1100/c2_qp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c
index 179d005ed4a5..420c1380f5c3 100644
--- a/drivers/infiniband/hw/amso1100/c2_qp.c
+++ b/drivers/infiniband/hw/amso1100/c2_qp.c
@@ -161,8 +161,10 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
161 161
162 if (attr_mask & IB_QP_STATE) { 162 if (attr_mask & IB_QP_STATE) {
163 /* Ensure the state is valid */ 163 /* Ensure the state is valid */
164 if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR) 164 if (attr->qp_state < 0 || attr->qp_state > IB_QPS_ERR) {
165 return -EINVAL; 165 err = -EINVAL;
166 goto bail0;
167 }
166 168
167 wr.next_qp_state = cpu_to_be32(to_c2_state(attr->qp_state)); 169 wr.next_qp_state = cpu_to_be32(to_c2_state(attr->qp_state));
168 170
@@ -184,9 +186,10 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
184 if (attr->cur_qp_state != IB_QPS_RTR && 186 if (attr->cur_qp_state != IB_QPS_RTR &&
185 attr->cur_qp_state != IB_QPS_RTS && 187 attr->cur_qp_state != IB_QPS_RTS &&
186 attr->cur_qp_state != IB_QPS_SQD && 188 attr->cur_qp_state != IB_QPS_SQD &&
187 attr->cur_qp_state != IB_QPS_SQE) 189 attr->cur_qp_state != IB_QPS_SQE) {
188 return -EINVAL; 190 err = -EINVAL;
189 else 191 goto bail0;
192 } else
190 wr.next_qp_state = 193 wr.next_qp_state =
191 cpu_to_be32(to_c2_state(attr->cur_qp_state)); 194 cpu_to_be32(to_c2_state(attr->cur_qp_state));
192 195