]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
CorebootPayloadPkg PlatformHookLib: Fix GCC build failure
[mirror_edk2.git] / CorebootPayloadPkg / Library / PlatformHookLib / PlatformHookLib.c
index 10fd332fe546de652e83ef99555d198bf69a4483..84499970503eaf0d164865e07677bf308c9c43ce 100644 (file)
@@ -45,11 +45,17 @@ PlatformHookSerialPortInitialize (
   }\r
 \r
   if (SerialRegAccessType == 2) { //MMIO\r
-    PcdSetBoolS (PcdSerialUseMmio, TRUE);\r
+    Status = PcdSetBoolS (PcdSerialUseMmio, TRUE);\r
   } else { //IO\r
-    PcdSetBoolS (PcdSerialUseMmio, FALSE);\r
+    Status = PcdSetBoolS (PcdSerialUseMmio, FALSE);\r
+  }\r
+  if (RETURN_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  Status = PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);\r
+  if (RETURN_ERROR (Status)) {\r
+    return Status;\r
   }\r
-  PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);\r
 \r
   return RETURN_SUCCESS;\r
 }\r