/* Add a usb device path into the DEVICE_PATH_LIST_ITEM list. */
EFI_STATUS EFIAPI AddUsbDPToList(IN EFI_DEVICE_PATH_PROTOCOL *UsbDP, IN LIST_ENTRY *UsbIoDPList)
/* Add a usb device path into the DEVICE_PATH_LIST_ITEM list. */
EFI_STATUS EFIAPI AddUsbDPToList(IN EFI_DEVICE_PATH_PROTOCOL *UsbDP, IN LIST_ENTRY *UsbIoDPList)
{
  DEVICE_PATH_LIST_ITEM  *ListItem;
  if ((UsbIoDPList == NULL) || (UsbDP == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  if (SearchUsbDPInList (UsbDP, UsbIoDPList)) {
    return EFI_SUCCESS;
  }
  ListItem = AllocateZeroPool (sizeof (DEVICE_PATH_LIST_ITEM));
  ASSERT (ListItem != NULL);
  ListItem->Signature  = DEVICE_PATH_LIST_ITEM_SIGNATURE;
  ListItem->DevicePath = DuplicateDevicePath (UsbDP);
  InsertTailList (UsbIoDPList, &ListItem->Link);
  return EFI_SUCCESS;
}