EmbeddedPkg/RTC: use returned status at init-time
[mirror_edk2.git] / 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