[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200824234422.1261394-1-ztong0001@gmail.com>
Date: Mon, 24 Aug 2020 19:44:21 -0400
From: Tong Zhang <ztong0001@...il.com>
To: selvin.xavier@...adcom.com, devesh.sharma@...adcom.com,
dledford@...hat.com, jgg@...pe.ca, kamalheib1@...il.com,
leon@...nel.org, maxg@...lanox.com, monis@...lanox.com,
ztong0001@...il.com, gustavoars@...nel.org, galpress@...zon.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Bernard Metzler <bmt@...ich.ibm.com>
Subject: [PATCH] RDMA: error code handling
ocrdma_qp_state_change() returns 1 when new and old state are the same,
however caller is checking using <0
Signed-off-by: Tong Zhang <ztong0001@...il.com>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index c1751c9a0f62..518687c5e2cb 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1384,7 +1384,7 @@ int _ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
/* if new and previous states are same hw doesn't need to
* know about it.
*/
- if (status < 0)
+ if (status == 1)
return status;
return ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask);
}
--
2.25.1
Powered by blists - more mailing lists