https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c86210e8003b9af41fa9f…
commit c86210e8003b9af41fa9f33f70682e246010d06a
Author: Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Thu Jan 11 02:40:56 2018 +0900
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:58 2018 +0100
[USBPORT] Correcting check Period.
---
drivers/usb/usbport/usb2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c
index 92568f7e48..8158c70d61 100644
--- a/drivers/usb/usbport/usb2.c
+++ b/drivers/usb/usbport/usb2.c
@@ -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;