From: Ram Amrani Date: Tue, 24 Jan 2017 11:50:34 +0000 (+0200) Subject: RDMA/qedr: Return success when not changing QP state X-Git-Tag: v4.10-rc6~12^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=865cea40b69741c3da2574176876463233b2b67c;p=platform%2Fkernel%2Flinux-exynos.git RDMA/qedr: Return success when not changing QP state If the user is requesting us to change the QP state to the same state that it is already in, return success instead of failure. Signed-off-by: Ram Amrani Signed-off-by: Michal Kalderon Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 84dcd73..27d90a8 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -1657,7 +1657,7 @@ static int qedr_update_qp_state(struct qedr_dev *dev, int status = 0; if (new_state == qp->state) - return 1; + return 0; switch (qp->state) { case QED_ROCE_QP_STATE_RESET: