From f38d0dfbefb1beb480695b7f038c1be300a6b12c Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Tue, 6 Jan 2015 15:48:19 +0000 Subject: [PATCH] ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron Reviewed-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16584 6f19259b-4bc3-4df7-8a09-765794883524 --- .../ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c index a4220a1895..51ea7c00fe 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c @@ -174,14 +174,14 @@ JunoFdtStart ( 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 @@ JunoFdtStart ( 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 @@ JunoFdtStart ( } } -UNLOAD_PROTOCOL: +CLOSE_PROTOCOL: // We do not need the FileSystem protocol gBS->CloseProtocol ( - ControllerHandle, - &gEfiSimpleFileSystemProtocolGuid, - DriverBinding->ImageHandle, - ControllerHandle); + ControllerHandle, + &gEfiSimpleFileSystemProtocolGuid, + gImageHandle, + ControllerHandle); return Status; } -- 2.39.2