if ((SerialDeviceCount != 0) && (RemainingDevicePath != NULL)) {\r
Uart = (UART_DEVICE_PATH *) SkipControllerDevicePathNode (RemainingDevicePath, &ContainsControllerNode, &ControllerNumber);\r
for (Index = 0; Index < SerialDeviceCount; Index++) {\r
+ ASSERT ((SerialDevices != NULL) && (SerialDevices[Index] != NULL));\r
if ((!SerialDevices[Index]->ContainsControllerNode && !ContainsControllerNode) ||\r
(SerialDevices[Index]->ContainsControllerNode && ContainsControllerNode && SerialDevices[Index]->Instance == ControllerNumber)\r
) {\r
// Restore the PCI attributes when all children is destroyed (PciDeviceInfo->ChildCount == 0).\r
//\r
PciDeviceInfo = AllocatePool (sizeof (PCI_DEVICE_INFO));\r
+ ASSERT (PciDeviceInfo != NULL);\r
PciDeviceInfo->ChildCount = 0;\r
PciDeviceInfo->PciIo = ParentIo.PciIo;\r
Status = ParentIo.PciIo->Attributes (\r
//\r
// Re-use the PciDeviceInfo stored in existing children.\r
//\r
+ ASSERT ((SerialDevices != NULL) && (SerialDevices[0] != NULL));\r
PciDeviceInfo = SerialDevices[0]->PciDeviceInfo;\r
ASSERT (PciDeviceInfo != NULL);\r
}\r