]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol
authorRonald Cron <Ronald.Cron@arm.com>
Tue, 6 Jan 2015 15:48:19 +0000 (15:48 +0000)
committeroliviermartin <oliviermartin@Edk2>
Tue, 6 Jan 2015 15:48:19 +0000 (15:48 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16584 6f19259b-4bc3-4df7-8a09-765794883524

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