From: Ceping Sun <cepingx....@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 <kra...@redhat.com> Cc: Jiewen Yao <jiewen....@intel.com> Cc: Min Xu <min.m...@intel.com> Signed-off-by: Ceping Sun <cepingx....@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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-