]> 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 b93626a6fbece31118d1fb3bb73afcc83a9794d4..f1e067c0b59e31354f3ae59eaef629a187eec375 100644 (file)
@@ -1,12 +1,12 @@
 /** @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.\r
-  \r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\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
   http://opensource.org/licenses/bsd-license.php\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