Revision: 16584
          http://sourceforge.net/p/edk2/code/16584
Author:   oliviermartin
Date:     2015-01-06 15:48:19 +0000 (Tue, 06 Jan 2015)
Log Message:
-----------
ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <[email protected]>
Reviewed-by: Olivier Martin <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c

Modified: trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c        
2015-01-06 15:47:25 UTC (rev 16583)
+++ trunk/edk2/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c        
2015-01-06 15:48:19 UTC (rev 16584)
@@ -174,14 +174,14 @@
   Status = BootMonFs->OpenVolume (BootMonFs, &Fs);
   if (EFI_ERROR (Status)) {
     PrintMessage ("Warning: Fail to open file system that should contain FDT 
file.\n");
-    goto UNLOAD_PROTOCOL;
+    goto CLOSE_PROTOCOL;
   }
 
   File = NULL;
   Status = Fs->Open (Fs, &File, mFdtFileName, EFI_FILE_MODE_READ, 0);
   if (EFI_ERROR (Status)) {
     PrintMessage ("Warning: Fail to load FDT file '%s'.\n", mFdtFileName);
-    goto UNLOAD_PROTOCOL;
+    goto CLOSE_PROTOCOL;
   }
 
   Size = 0;
@@ -189,7 +189,7 @@
   FileInfo = AllocatePool (Size);
   Status = File->GetInfo (File, &gEfiFileInfoGuid, &Size, FileInfo);
   if (EFI_ERROR (Status)) {
-    goto UNLOAD_PROTOCOL;
+    goto CLOSE_PROTOCOL;
   }
 
   // Get the file size
@@ -219,13 +219,13 @@
     }
   }
 
-UNLOAD_PROTOCOL:
+CLOSE_PROTOCOL:
   // We do not need the FileSystem protocol
   gBS->CloseProtocol (
-      ControllerHandle,
-      &gEfiSimpleFileSystemProtocolGuid,
-      DriverBinding->ImageHandle,
-      ControllerHandle);
+         ControllerHandle,
+         &gEfiSimpleFileSystemProtocolGuid,
+         gImageHandle,
+         ControllerHandle);
 
   return Status;
 }


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to