lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220719090948.612921-1-zys.zljxml@gmail.com>
Date:   Tue, 19 Jul 2022 17:09:48 +0800
From:   zys.zljxml@...il.com
To:     bharat@...lsio.com, jgg@...pe.ca, leon@...nel.org
Cc:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yushan Zhou <katrinzhou@...cent.com>
Subject: [PATCH] RDMA/cxgb4: Cleanup unused assignments

From: Yushan Zhou <katrinzhou@...cent.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@...cent.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ