From cdfabd20ed6f1a18a5360349de8499d61eacc82e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 10 Mar 2019 04:37:52 +0000 Subject: [PATCH] scst_lib: Remove a superfluous if-condition Since earlier code dereferences res->tgt_dev, res->tgt_dev can't be NULL when the if (res->tgt_dev) code is reached. Hence remove the if (res->tgt_dev != NULL) check. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8030 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 28d1967e7..b27d13c9a 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5770,8 +5770,7 @@ struct scst_cmd *__scst_create_prepare_internal_cmd(const uint8_t *cdb, } scst_sess_get(res->sess); - if (res->tgt_dev != NULL) - res->cpu_cmd_counter = scst_get(); + res->cpu_cmd_counter = scst_get(); TRACE(TRACE_SCSI, "New internal cmd %p (op %s)", res, scst_get_opcode_name(res));