mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
scsi: target/tcm_loop: Avoid that static checkers warn about dead code
The code under the "release:" label can only be reached after se_cmd has
been set to a non-NULL value. Hence remove the if (se_cmd) test. Keep the
else-part since calling transport_generic_free_cmd() is not necessary for a
command that has not been submitted to the core.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 4d3895d5ea
("target/tcm_loop: Merge struct tcm_loop_cmd and struct tcm_loop_tmr")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
aa090eabcb
commit
799d44d0fa
1 changed files with 1 additions and 4 deletions
|
@ -239,10 +239,7 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
release:
|
release:
|
||||||
if (se_cmd)
|
kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
|
||||||
transport_generic_free_cmd(se_cmd, 0);
|
|
||||||
else
|
|
||||||
kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue