[edk2-devel] [PATCH V2 6/6] OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed
Min Xu
min.m.xu at intel.com
Mon Jan 9 13:59:17 UTC 2023
From: Min M Xu <min.m.xu at intel.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237
Installation of gQemuAcpiTableNotifyProtocol may fail. The error code
should be returned so that the caller can handle it.
Cc: Erdem Aktas <erdemaktas at google.com>
Cc: James Bottomley <jejb at linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Tom Lendacky <thomas.lendacky at amd.com>
Cc: Sebastien Boeuf <sebastien.boeuf at intel.com>
Signed-off-by: Min Xu <min.m.xu at intel.com>
---
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index d849a59526b5..98e4f02203d8 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -89,12 +89,16 @@ InstallCloudHvTablesTdx (
// Install a protocol to notify that the ACPI table provided by CH is
// ready.
//
- gBS->InstallProtocolInterface (
- &ChAcpiHandle,
- &gQemuAcpiTableNotifyProtocolGuid,
- EFI_NATIVE_INTERFACE,
- NULL
- );
+ Status = gBS->InstallProtocolInterface (
+ &ChAcpiHandle,
+ &gQemuAcpiTableNotifyProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ ASSERT_EFI_ERROR (Status);
+ return Status;
+ }
return EFI_SUCCESS;
}
--
2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98188): https://edk2.groups.io/g/devel/message/98188
Mute This Topic: https://groups.io/mt/96152534/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list