audk/OvmfPkg/AcpiPlatformDxe
Ceping Sun cf87fd95c1 OvmfPkg/AcpiPlatformDxe: Fix Coverity report issues
v1 -> v2 Changed list:
 1:Since both commits are intended to fix coverity issues, they are merged
   into one
 2:Changed the debug info level to debug error when "DsdtTable == NULL"
 3:Add the Cc member as below
  Erdem Aktas erdemaktas@google.com
  James Bottomley jejb@linux.ibm.com
  Tom Lendacky thomas.lendacky@amd.com
  Michael Roth michael.roth@amd.com

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4568

The function InstallCloudHvTablesTdx had an Assert when "DsdtTable ==
NULL", but this comes into play only in DEBUG mode. In Release mode ,
there is no handling if the pointer is NULL. To avoid the possible null
pointer dereference, it is better to handle it when the pointer is null.

In addition, the status of "AcpiProtocol->InstallAcpiTable" is overwritten
before it can be used in the function, it is better to check it before
overwriting.

code: https://github.com/sunceping/edk2/tree/fixcoverityerrors.v2

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Message-Id: <20231023090539.1003-1-cepingx.sun@intel.com>
Reviewed-by: Min Xu <min.m.xu@intel.com>
[lersek@redhat.com: rewrap commit message to placate PatchCheck.py]
2023-10-25 09:52:06 +00:00
..
AcpiPlatform.c OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib 2023-06-23 17:26:37 +00:00
AcpiPlatform.h OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib 2023-06-23 17:26:37 +00:00
AcpiPlatformDxe.inf OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib 2023-06-23 17:26:37 +00:00
CloudHvAcpi.c OvmfPkg/AcpiPlatformDxe: Fix Coverity report issues 2023-10-25 09:52:06 +00:00
EntryPoint.c OvmfPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00