]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/IoMmuDxe/IoMmuDxe.c
OvmfPkg/IoMmuDxe: propagate errors from AmdSevInstallIoMmuProtocol()
[mirror_edk2.git] / OvmfPkg / IoMmuDxe / IoMmuDxe.c
index 5809afc44196e45f6868332b81b6a5303eaa2ea8..0ea42cbc13cee853b2ad23c1b0de4ce106c287f7 100644 (file)
@@ -33,16 +33,18 @@ IoMmuDxeEntryPoint (
   IN EFI_SYSTEM_TABLE   *SystemTable\r
   )\r
 {\r
-  EFI_STATUS    Status = EFI_SUCCESS;\r
-  EFI_HANDLE    Handle = NULL;\r
+  EFI_STATUS    Status;\r
+  EFI_HANDLE    Handle;\r
 \r
   //\r
   // When SEV is enabled, install IoMmu protocol otherwise install the\r
   // placeholder protocol so that other dependent module can run.\r
   //\r
   if (MemEncryptSevIsEnabled ()) {\r
-    AmdSevInstallIoMmuProtocol ();\r
+    Status = AmdSevInstallIoMmuProtocol ();\r
   } else {\r
+    Handle = NULL;\r
+\r
     Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &Handle,\r
                   &gIoMmuAbsentProtocolGuid,\r