]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: core: Remove unreachable code warning
authorYang Li <yang.lee@linux.alibaba.com>
Tue, 1 Mar 2022 08:04:48 +0000 (16:04 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 15 Mar 2022 04:10:27 +0000 (00:10 -0400)
commitf59e2b9e82cd54477c565b2564c22da1c254edff
treefaa88e6bc0fbf7aa5b0aa16b9b279cd9b57b7bb9
parentca08635fce5ad0b01fa9a15f6ae9d649870dca58
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>
drivers/scsi/scsi_error.c