From: Ceping Sun <cepingx.sun@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4568
The status of "AcpiProtocol->InstallAcpiTable" is overwritten
before it can be used, it is better to check it before overwriting.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
---
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index 24c22bb646ca..7e2adcaa82d3 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -53,6 +53,11 @@ InstallCloudHvTablesTdx (
CurrentTable->Length,
&TableHandle
);
+ if (EFI_ERROR (Status)) {
+ ASSERT_EFI_ERROR (Status);
+ return Status;
+ }
+
for (UINTN i = 0; i < CurrentTable->Length; i++) {
DEBUG ((DEBUG_INFO, " %x", *((UINT8 *)CurrentTable + i)));
}
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109793): https://edk2.groups.io/g/devel/message/109793
Mute This Topic: https://groups.io/mt/102055425/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-