]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c
ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol
[mirror_edk2.git] / ArmPlatformPkg / ArmJunoPkg / Drivers / ArmJunoDxe / InstallFdt.c
index a4220a1895c44f7aee054f26c525050f0bd4fa9d..51ea7c00fe05b79c50255887ded72ed4039b7fdc 100644 (file)
@@ -174,14 +174,14 @@ JunoFdtStart (
   Status = BootMonFs->OpenVolume (BootMonFs, &Fs);\r
   if (EFI_ERROR (Status)) {\r
     PrintMessage ("Warning: Fail to open file system that should contain FDT file.\n");\r
-    goto UNLOAD_PROTOCOL;\r
+    goto CLOSE_PROTOCOL;\r
   }\r
 \r
   File = NULL;\r
   Status = Fs->Open (Fs, &File, mFdtFileName, EFI_FILE_MODE_READ, 0);\r
   if (EFI_ERROR (Status)) {\r
     PrintMessage ("Warning: Fail to load FDT file '%s'.\n", mFdtFileName);\r
-    goto UNLOAD_PROTOCOL;\r
+    goto CLOSE_PROTOCOL;\r
   }\r
 \r
   Size = 0;\r
@@ -189,7 +189,7 @@ JunoFdtStart (
   FileInfo = AllocatePool (Size);\r
   Status = File->GetInfo (File, &gEfiFileInfoGuid, &Size, FileInfo);\r
   if (EFI_ERROR (Status)) {\r
-    goto UNLOAD_PROTOCOL;\r
+    goto CLOSE_PROTOCOL;\r
   }\r
 \r
   // Get the file size\r
@@ -219,13 +219,13 @@ JunoFdtStart (
     }\r
   }\r
 \r
-UNLOAD_PROTOCOL:\r
+CLOSE_PROTOCOL:\r
   // We do not need the FileSystem protocol\r
   gBS->CloseProtocol (\r
-      ControllerHandle,\r
-      &gEfiSimpleFileSystemProtocolGuid,\r
-      DriverBinding->ImageHandle,\r
-      ControllerHandle);\r
+         ControllerHandle,\r
+         &gEfiSimpleFileSystemProtocolGuid,\r
+         gImageHandle,\r
+         ControllerHandle);\r
 \r
   return Status;\r
 }\r