EmbeddedPkg/RTC: use returned status at init-time
authorLeo Duran <leo.duran@amd.com>
Thu, 24 Mar 2016 20:30:11 +0000 (15:30 -0500)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 25 Mar 2016 06:09:49 +0000 (07:09 +0100)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c

index 80af8cf..f1e067c 100644 (file)
@@ -139,7 +139,10 @@ InitializeRealTimeClock (
 {\r
   EFI_STATUS  Status;\r
 \r
-  LibRtcInitialize (ImageHandle, SystemTable);\r
+  Status = LibRtcInitialize (ImageHandle, SystemTable);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   SystemTable->RuntimeServices->GetTime       = GetTime;\r
   SystemTable->RuntimeServices->SetTime       = SetTime;\r