mirror of https://github.com/acidanthera/audk.git
ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system protocol
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
This commit is contained in:
parent
8a8641b564
commit
f38d0dfbef
|
@ -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,12 +219,12 @@ JunoFdtStart (
|
|||
}
|
||||
}
|
||||
|
||||
UNLOAD_PROTOCOL:
|
||||
CLOSE_PROTOCOL:
|
||||
// We do not need the FileSystem protocol
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
DriverBinding->ImageHandle,
|
||||
gImageHandle,
|
||||
ControllerHandle);
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in New Issue