EmbeddedPkg/RTC: use returned status at init-time

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
Leo Duran 2016-03-24 15:30:11 -05:00 committed by Ard Biesheuvel
parent 3decba3d32
commit da6ae66641
1 changed files with 4 additions and 1 deletions

View File

@ -139,7 +139,10 @@ InitializeRealTimeClock (
{
EFI_STATUS Status;
LibRtcInitialize (ImageHandle, SystemTable);
Status = LibRtcInitialize (ImageHandle, SystemTable);
if (EFI_ERROR (Status)) {
return Status;
}
SystemTable->RuntimeServices->GetTime = GetTime;
SystemTable->RuntimeServices->SetTime = SetTime;