Skip to contentSkip to conversation

scsi: elx: efct: remove null check after call container_of()

PATCH Applied Haowen Bai 2 participants 2 messages May 17, 2022 – May 20, 2022

Subsystems (3)
lore
Share & tools
lore

Haowen Bai

author
#0 lore raw

PATCH 1/1 scsi: elx: efct: remove null check after call container_of()

container_of() will never return NULL, so remove useless code.

---
 drivers/scsi/elx/efct/efct_lio.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/scsi/elx/efct/efct_lio.c +0 -3
index 8b004a5818d6..be4b5c1ee32d 100644
@@ -370,9 +370,6 @@ static int efct_lio_get_cmd_state(struct se_cmd *cmd)
 		container_of(cmd, struct efct_scsi_tgt_io, cmd);
 	struct efct_io *io = container_of(ocp, struct efct_io, tgt_io);
 
-	if (!io)
-		return 0;
-
 	return io->tgt_io.state;
 }
 
Signature · 1 line
2.7.4