From a3b4eb29330f688aba823d8669a408c97a551699 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Tue, 6 Sep 2011 07:05:06 +0000 Subject: Check the pointer before use it. Signed-off-by:ydong10 Reviewed-by:vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12283 6f19259b-4bc3-4df7-8a09-765794883524 --- .../AcpiSupportAcpiSupportProtocol.c | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'IntelFrameworkModulePkg/Universal') diff --git a/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c b/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c index 1a28f02933..6c9cb740a9 100644 --- a/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c +++ b/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c @@ -844,17 +844,18 @@ AddTableToList ( ); AcpiSupportInstance->Xsdt->OemRevision = AcpiSupportInstance->Fadt3->Header.OemRevision; } - } - // - // Checksum the table - // - if (Checksum) { - AcpiPlatformChecksum ( - CurrentTableList->Table, - CurrentTableList->Table->Length, - OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, - Checksum) - ); + + // + // Checksum the table + // + if (Checksum) { + AcpiPlatformChecksum ( + CurrentTableList->Table, + CurrentTableList->Table->Length, + OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, + Checksum) + ); + } } break; -- cgit v1.2.3