]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
EmbeddedPkg/RTC: use returned status at init-time
[mirror_edk2.git] / EmbeddedPkg / RealTimeClockRuntimeDxe / RealTimeClock.c
index 9564cf55eead4bf8f65f814c911edd0fc9a4dcd8..f1e067c0b59e31354f3ae59eaef629a187eec375 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Implement EFI RealTimeClock runtime services via RTC Lib.\r
-  \r
+\r
   Currently this driver does not support runtime virtual calling.\r
 \r
 \r
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-  \r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,7 +16,7 @@
 \r
 **/\r
 \r
-#include <PiDxe.h> \r
+#include <PiDxe.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/RealTimeClockLib.h>\r
@@ -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