mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
UefiPayloadPkg: Bugfix: Do not parse NULL nodes
Not every node has compatible property; avoid parsing nodes which return NULL. Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
This commit is contained in:
parent
ed665ef38c
commit
4d35077048
@ -840,6 +840,8 @@ ParseDtb (
|
||||
} // end of memory node
|
||||
else {
|
||||
PropertyPtr = FdtGetProperty (Fdt, Node, "compatible", &TempLen);
|
||||
if (PropertyPtr == NULL)
|
||||
continue;
|
||||
TempStr = (CHAR8 *)(PropertyPtr->Data);
|
||||
if (AsciiStrnCmp (TempStr, "pci-rb", AsciiStrLen ("pci-rb")) == 0) {
|
||||
RootBridgeCount++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user