summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-05-17 04:25:36 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-05-20 03:16:27 +0300
commitd627660c22b51121262c03dfa1a51bf54361f5a9 (patch)
tree09faffa65d2753466257affc1a1fec77c10ba3b6
parent91fdd0788878862581128c86025c8a6262aeb868 (diff)
downloadlinux-d627660c22b51121262c03dfa1a51bf54361f5a9.tar.xz
scsi: elx: efct: Remove NULL check after calling container_of()
container_of() will never return NULL. Link: https://lore.kernel.org/r/1652750737-22673-1-git-send-email-baihaowen@meizu.com Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/elx/efct/efct_lio.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index 8b004a5818d6..be4b5c1ee32d 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -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;
}