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
This commit is contained in:
Bart Van Assche
2019-03-10 04:37:52 +00:00
parent 5a17d29821
commit cdfabd20ed

View File

@@ -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));