summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2023-01-11 09:22:35 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-15 10:26:15 +0000
commit7cd55f300915af8759bdf1687af7e3a7f4d4f13c (patch)
tree35703c9c30c8af93baf77dd560d53cc8c5d13b95 /OvmfPkg
parent66f18fde49c7fe65818db0801cdaf63015e875e5 (diff)
downloadedk2-7cd55f300915af8759bdf1687af7e3a7f4d4f13c.tar.gz
edk2-7cd55f300915af8759bdf1687af7e3a7f4d4f13c.tar.bz2
edk2-7cd55f300915af8759bdf1687af7e3a7f4d4f13c.zip
OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed
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@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Sebastien Boeuf <sebastien.boeuf@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Message-Id: <20230111012235.189-7-min.m.xu@intel.com> Reviewed-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index 8f90ea2399..d56eb074a9 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -89,12 +89,16 @@ InstallCloudHvTablesTdx (
// ready.
//
ChAcpiHandle = NULL;
- 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;
}