summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/BdsLib/BdsFilePath.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/BdsLib/BdsFilePath.c')
-rw-r--r--ArmPkg/Library/BdsLib/BdsFilePath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c
index f7a06e5a89..be1a824d50 100644
--- a/ArmPkg/Library/BdsLib/BdsFilePath.c
+++ b/ArmPkg/Library/BdsLib/BdsFilePath.c
@@ -264,8 +264,11 @@ TryRemovableDevice (
EFI_DEVICE_PATH* RemovableDevicePath;
BOOLEAN RemovableFound;
- RemovableFound = FALSE;
- TmpDevicePath = DevicePath;
+ RemovableDevice = NULL;
+ RemovableDevicePath = NULL;
+ RemovableFound = FALSE;
+ TmpDevicePath = DevicePath;
+
while (!IsDevicePathEnd (TmpDevicePath) && !RemovableFound) {
for (Index = 0; Index < sizeof(RemovableDeviceSupport) / sizeof(BDS_REMOVABLE_DEVICE_SUPPORT); Index++) {
RemovableDevice = &RemovableDeviceSupport[Index];