diff --git a/DynamicTablesPkg/Library/Acpi/RiscV/AcpiRhctLibRiscV/RhctGenerator.c b/DynamicTablesPkg/Library/Acpi/RiscV/AcpiRhctLibRiscV/RhctGenerator.c index 5fbd04b814..e4b5b2d5ca 100644 --- a/DynamicTablesPkg/Library/Acpi/RiscV/AcpiRhctLibRiscV/RhctGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/RiscV/AcpiRhctLibRiscV/RhctGenerator.c @@ -503,6 +503,11 @@ AddIsaStringNodes ( IsaLength, NodeList->IsaString ); + if (EFI_ERROR (Status)) { + ASSERT (0); + return Status; + } + IsaStringNode = (EFI_ACPI_6_6_RHCT_ISA_STRING_NODE *)((CHAR8 *)IsaStringNode + NodeLength); NodeList++; } diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/RiscV/Intc/RiscVIntcParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/RiscV/Intc/RiscVIntcParser.c index caad27a645..4376ce1270 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/RiscV/Intc/RiscVIntcParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/RiscV/Intc/RiscVIntcParser.c @@ -945,6 +945,11 @@ PlicAplicInfoParser ( ); } + if (EFI_ERROR (Status)) { + ASSERT (0); + return Status; + } + Id++; } @@ -1095,7 +1100,6 @@ ImsicGetInfo ( CONST UINT64 *Prop; INT32 Len; INT32 NumPhandle; - UINTN NumImsicBase; if (ImsicInfo == NULL) { ASSERT (0); @@ -1172,7 +1176,6 @@ ImsicGetInfo ( return EFI_INVALID_PARAMETER; } - NumImsicBase = (Len / sizeof (UINT32)) / 4; if (ImsicInfo->HartIndexBits == 0) { Len = NumPhandle; while (Len > 0) { @@ -1286,14 +1289,12 @@ RiscVIntcInfoParser ( { CM_OBJ_DESCRIPTOR *NewCmObjDesc; EFI_STATUS Status; - VOID *Fdt; if (FdtParserHandle == NULL) { ASSERT (0); return EFI_INVALID_PARAMETER; } - Fdt = FdtParserHandle->Fdt; NewCmObjDesc = NULL; // Parse the "cpus" nodes and its children "cpu" nodes,