mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
scsi: core: Remove unreachable code warning
The smatch tool reported the following warning: drivers/scsi/scsi_error.c:1988 scsi_decide_disposition() warn: ignoring unreachable code. Remove the "default:return FAILED;" instead of "return FAILED;" reported by smatch, because compilers can provide more useful diagnostics about switch/case statements that do not have a default statement, especially if the "switch" applies to a value with enumeration type. Link: https://lore.kernel.org/r/20220301080448.112813-1-yang.lee@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
7db304bd2a
commit
e1b353e7a3
1 changed files with 0 additions and 2 deletions
|
@ -1987,8 +1987,6 @@ enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *scmd)
|
||||||
"reservation conflict\n");
|
"reservation conflict\n");
|
||||||
set_host_byte(scmd, DID_NEXUS_FAILURE);
|
set_host_byte(scmd, DID_NEXUS_FAILURE);
|
||||||
return SUCCESS; /* causes immediate i/o error */
|
return SUCCESS; /* causes immediate i/o error */
|
||||||
default:
|
|
||||||
return FAILED;
|
|
||||||
}
|
}
|
||||||
return FAILED;
|
return FAILED;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue