DynamicTablesPkg: Fix order of assert checks

Reordered the asserts to first check if the pointer is valid
before de-referencing the pointer.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
This commit is contained in:
Sami Mujawar 2020-09-03 11:45:07 +01:00 committed by mergify[bot]
parent 26442d11e6
commit 653fb710ce
1 changed files with 2 additions and 2 deletions

View File

@ -90,10 +90,10 @@ FreeSsdtSerialPortTableEx (
UINTN Index;
ASSERT (This != NULL);
ASSERT (AcpiTableInfo != NULL);
ASSERT (CfgMgrProtocol != NULL);
ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
ASSERT (CfgMgrProtocol != NULL);
ASSERT (AcpiTableInfo != NULL);
if ((Table == NULL) ||
(*Table == NULL) ||