mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: target: remove redundant assignment to variable 'ret'
@ 2020-09-14  2:32 Jing Xiangfeng
  2020-09-15 11:58 ` Maurizio Lombardi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-09-14  2:32 UTC (permalink / raw)
  To: martin.petersen, bvanassche, michael.christie, mlombard,
	sudhakar.panneerselvam, ddiss, gustavoars
  Cc: linux-scsi, target-devel, linux-kernel, jingxiangfeng

The variable ret has been initialized with a value '0'. The assignment
in switch-case is redundant. So remove it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/target/iscsi/iscsi_target.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index cd045dc75a58..f5272ac18b16 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4516,7 +4516,6 @@ int iscsit_logout_post_handler(
 			iscsit_logout_post_handler_closesession(conn);
 			break;
 		}
-		ret = 0;
 		break;
 	case ISCSI_LOGOUT_REASON_CLOSE_CONNECTION:
 		if (conn->cid == cmd->logout_cid) {
@@ -4527,7 +4526,6 @@ int iscsit_logout_post_handler(
 				iscsit_logout_post_handler_samecid(conn);
 				break;
 			}
-			ret = 0;
 		} else {
 			switch (cmd->logout_response) {
 			case ISCSI_LOGOUT_SUCCESS:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-22  3:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14  2:32 [PATCH] scsi: target: remove redundant assignment to variable 'ret' Jing Xiangfeng
2020-09-15 11:58 ` Maurizio Lombardi
2020-09-15 22:06 ` Martin K. Petersen
2020-09-22  3:56 ` Martin K. Petersen

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®