EmbeddedPkg/RTC: use returned status at init-time
[mirror_edk2.git] / EmbeddedPkg / RealTimeClockRuntimeDxe / RealTimeClock.c
index 80af8cf824933aed91dab441af4cdb3ab248d5ed..f1e067c0b59e31354f3ae59eaef629a187eec375 100644 (file)
@@ -139,7 +139,10 @@ InitializeRealTimeClock (
 {\r
   EFI_STATUS  Status;\r
 \r
 {\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
 \r
   SystemTable->RuntimeServices->GetTime       = GetTime;\r
   SystemTable->RuntimeServices->SetTime       = SetTime;\r