mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 06:36:27 +00:00
scst_targ: Remove dead code
Detected by Coverity. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6360 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3239,7 +3239,6 @@ static int scst_exec_check_blocking(struct scst_cmd **active_cmd)
|
|||||||
{
|
{
|
||||||
struct scst_cmd *cmd = *active_cmd;
|
struct scst_cmd *cmd = *active_cmd;
|
||||||
struct scst_cmd *ref_cmd;
|
struct scst_cmd *ref_cmd;
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
TRACE_ENTRY();
|
TRACE_ENTRY();
|
||||||
|
|
||||||
@@ -3300,8 +3299,6 @@ static int scst_exec_check_blocking(struct scst_cmd **active_cmd)
|
|||||||
sBUG_ON(rc != SCST_EXEC_COMPLETED);
|
sBUG_ON(rc != SCST_EXEC_COMPLETED);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
count++;
|
|
||||||
|
|
||||||
cmd = scst_post_exec_sn(cmd, false);
|
cmd = scst_post_exec_sn(cmd, false);
|
||||||
if (cmd == NULL)
|
if (cmd == NULL)
|
||||||
break;
|
break;
|
||||||
@@ -3320,15 +3317,11 @@ done:
|
|||||||
|
|
||||||
*active_cmd = cmd;
|
*active_cmd = cmd;
|
||||||
|
|
||||||
if (count == 0)
|
|
||||||
goto out_put;
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
||||||
if (ref_cmd->dev->scsi_dev != NULL)
|
if (ref_cmd->dev->scsi_dev != NULL)
|
||||||
generic_unplug_device(ref_cmd->dev->scsi_dev->request_queue);
|
generic_unplug_device(ref_cmd->dev->scsi_dev->request_queue);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
out_put:
|
|
||||||
__scst_cmd_put(ref_cmd);
|
__scst_cmd_put(ref_cmd);
|
||||||
/* !! At this point sess, dev and tgt_dev can be already freed !! */
|
/* !! At this point sess, dev and tgt_dev can be already freed !! */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user