Skip to content

Commit

Permalink
ArmJunoDxe/InstallFdt.c: Fix the closing of the simple file system pr…
Browse files Browse the repository at this point in the history
…otocol

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16584 6f19259b-4bc3-4df7-8a09-765794883524
  • Loading branch information
ronald-cron-arm authored and oliviermartin committed Jan 6, 2015
1 parent 8a8641b commit f38d0df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/InstallFdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,22 @@ 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;
File->GetInfo (File, &gEfiFileInfoGuid, &Size, NULL);
FileInfo = AllocatePool (Size);
Status = File->GetInfo (File, &gEfiFileInfoGuid, &Size, FileInfo);
if (EFI_ERROR (Status)) {
goto UNLOAD_PROTOCOL;
goto CLOSE_PROTOCOL;
}

// Get the file size
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit f38d0df

Please sign in to comment.