summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-08-18 04:07:01 +0200
committerLaszlo Ersek <lersek@redhat.com>2017-08-19 00:39:01 +0200
commitc09e481bbb34cb781b3d98f4ec781305e61dfda5 (patch)
tree899681ea2db28079870c1ce00cf62f1164a77f03 /MdeModulePkg
parent897efb977ffb23405e15e31533d5487b13873f00 (diff)
downloadedk2-c09e481bbb34cb781b3d98f4ec781305e61dfda5.tar.gz
edk2-c09e481bbb34cb781b3d98f4ec781305e61dfda5.tar.bz2
edk2-c09e481bbb34cb781b3d98f4ec781305e61dfda5.zip
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 <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c7
1 files changed, 4 insertions, 3 deletions
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;
}