mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zys.zljxml@gmail.com
To: bharat@chelsio.com, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yushan Zhou <katrinzhou@tencent.com>
Subject: [PATCH] RDMA/cxgb4: Cleanup unused assignments
Date: Tue, 19 Jul 2022 17:09:48 +0800	[thread overview]
Message-ID: <20220719090948.612921-1-zys.zljxml@gmail.com> (raw)

From: Yushan Zhou <katrinzhou@tencent.com>

The variable err is reassigned before the assigned value works.
Cleanup unused assignments reported by Coverity.

Addresses-Coverity: ("UNUSED_VALUE")
Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
---
 drivers/infiniband/hw/cxgb4/cm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index c16017f6e8db..3462fe991f93 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1590,7 +1590,6 @@ static int process_mpa_reply(struct c4iw_ep *ep, struct sk_buff *skb)
 					insuff_ird = 1;
 			}
 			if (insuff_ird) {
-				err = -ENOMEM;
 				ep->ird = resp_ord;
 				ep->ord = resp_ird;
 			}
@@ -1655,7 +1654,7 @@ static int process_mpa_reply(struct c4iw_ep *ep, struct sk_buff *skb)
 		attrs.ecode = MPA_NOMATCH_RTR;
 		attrs.next_state = C4IW_QP_STATE_TERMINATE;
 		attrs.send_term = 1;
-		err = c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
+		c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
 				C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
 		err = -ENOMEM;
 		disconnect = 1;
@@ -1674,7 +1673,7 @@ static int process_mpa_reply(struct c4iw_ep *ep, struct sk_buff *skb)
 		attrs.ecode = MPA_INSUFF_IRD;
 		attrs.next_state = C4IW_QP_STATE_TERMINATE;
 		attrs.send_term = 1;
-		err = c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
+		c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
 				C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
 		err = -ENOMEM;
 		disconnect = 1;
-- 
2.27.0


             reply	other threads:[~2022-07-19  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  9:09 zys.zljxml [this message]
2022-07-21  7:17 ` Leon Romanovsky
2022-07-22  4:47   ` Katrin Jo

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20220719090948.612921-1-zys.zljxml@gmail.com \
    --to=zys.zljxml@gmail.com \
    --cc=bharat@chelsio.com \
    --cc=jgg@ziepe.ca \
    --cc=katrinzhou@tencent.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

all inboxes | Powered by JetHome®