diff --git a/drivers/staging/rdma/hfi1/qp.c b/drivers/staging/rdma/hfi1/qp.c index 4f40c987303bec3a5eb37ef4b15fefd1ac92ce78..a17cb732277e11469080ba86e1fe68a13d205180 100644 --- a/drivers/staging/rdma/hfi1/qp.c +++ b/drivers/staging/rdma/hfi1/qp.c @@ -329,11 +329,9 @@ __be32 hfi1_compute_aeth(struct rvt_qp *qp) if (credit_table[x] > credits) { max = x; } else { - if (min == x) { + if (min == x) break; - } else { - min = x; - } + min = x; } } aeth |= x << HFI1_AETH_CREDIT_SHIFT;