mirror of https://github.com/acidanthera/audk.git
fix build error.
Signed-off-by: erictian Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12401 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3ecd0155a9
commit
ec99fa8efb
|
@ -285,7 +285,10 @@ UsbDebugPortIn (
|
|||
}
|
||||
|
||||
*Length = (UINT8)(MmioRead32((UINTN)&DebugPortRegister->ControlStatus) & 0xF);
|
||||
ASSERT (*Length <= 8);
|
||||
if (*Length > 8) {
|
||||
return RETURN_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
for (Index = 0; Index < *Length; Index++) {
|
||||
Buffer[Index] = DebugPortRegister->DataBuffer[Index];
|
||||
}
|
||||
|
@ -643,7 +646,11 @@ InitializeUsbDebugHardware (
|
|||
//
|
||||
return Status;
|
||||
}
|
||||
ASSERT (Length == sizeof(USB_DEBUG_PORT_DESCRIPTOR));
|
||||
|
||||
if (Length != sizeof(USB_DEBUG_PORT_DESCRIPTOR)) {
|
||||
return RETURN_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// set usb debug device address as 0x7F.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue