From e1b353e7a31dcaf47c234812c46a2db9cd5be584 Mon Sep 17 00:00:00 2001 From: Yang Li Date: Tue, 1 Mar 2022 16:04:48 +0800 Subject: [PATCH] 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 Signed-off-by: Yang Li Signed-off-by: Martin K. Petersen --- drivers/scsi/scsi_error.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index fd0827116f53..cdaca13ac1f1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1987,8 +1987,6 @@ enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *scmd) "reservation conflict\n"); set_host_byte(scmd, DID_NEXUS_FAILURE); return SUCCESS; /* causes immediate i/o error */ - default: - return FAILED; } return FAILED; -- 2.25.1