[USBPORT] Correcting check Period.

This commit is contained in:
Vadim Galyant 2018-01-11 02:40:56 +09:00 committed by Amine Khaldi
parent dd1297f0d0
commit c86210e800

View file

@ -7,7 +7,7 @@
#include "usbport.h"
//#define NDEBUG
#define NDEBUG
#include <debug.h>
BOOLEAN
@ -2104,8 +2104,6 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice,
FdoExtension = FdoDevice->DeviceExtension;
Period = Endpoint->EndpointProperties.Period;
ASSERT(Period != 0);
ScheduleOffset = Endpoint->EndpointProperties.ScheduleOffset;
EndpointBandwidth = Endpoint->EndpointProperties.UsbBandwidth;
@ -2132,6 +2130,7 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice,
RtlZeroMemory(Rebalance, sizeof(USB2_REBALANCE));
ASSERT(Period != 0);
Factor = USB2_FRAMES / Period;
n = ScheduleOffset * Factor;