From: Laszlo Ersek Date: Fri, 18 Aug 2017 02:07:01 +0000 (+0200) Subject: MdeModulePkg/ScsiBusDxe: remove redundant "else" after "break" statement X-Git-Tag: edk2-stable201903~3609 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=c09e481bbb34cb781b3d98f4ec781305e61dfda5 MdeModulePkg/ScsiBusDxe: remove redundant "else" after "break" statement The code after the "if" statement is only reachable if the first branch with the "break" is not taken. Therefore we can move the "else" branch after the "if" statement, simplifying the code. Cc: Eric Dong Cc: Feng Tian Cc: Hannes Reinecke Cc: Paolo Bonzini Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Star Zeng --- diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 72e3da8967..1068770cd8 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -1333,9 +1333,10 @@ DiscoverScsiDevice ( ); if (!EFI_ERROR (Status)) { break; - } else if ((Status == EFI_BAD_BUFFER_SIZE) || - (Status == EFI_INVALID_PARAMETER) || - (Status == EFI_UNSUPPORTED)) { + } + if ((Status == EFI_BAD_BUFFER_SIZE) || + (Status == EFI_INVALID_PARAMETER) || + (Status == EFI_UNSUPPORTED)) { ScsiDeviceFound = FALSE; goto Done; }