archive mirror
 help / color / mirror / Atom feed
From: Jiapeng Chong <>
	chongjiapeng <>
Subject: [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce()
Date: Fri, 23 Jul 2021 18:32:53 +0800	[thread overview]
Message-ID: <> (raw)

From: chongjiapeng <>

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

Eliminate the follow smatch warning:

drivers/infiniband/hw/irdma/verbs.c:1344 irdma_modify_qp_roce() warn:
missing error code 'ret'.

Reported-by: Abaci Robot <>
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: chongjiapeng <>
 drivers/infiniband/hw/irdma/verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 717147e..406c8b05 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -1341,6 +1341,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 		case IB_QPS_SQD:
 			if (iwqp->iwarp_state == IRDMA_QP_STATE_SQD)
+				ret = -EINVAL;
 				goto exit;
 			if (iwqp->iwarp_state != IRDMA_QP_STATE_RTS) {

             reply	other threads:[~2021-07-23 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 10:32 Jiapeng Chong [this message]
2021-07-23 16:36 ` [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce() kernel test robot
2021-07-24  2:05 ` kernel test robot
2021-07-25 10:22 ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).