[USBPORT] Correcting USB2_GetStartTime().
authorVadim Galyant <vgal@rambler.ru>
Sat, 9 Dec 2017 06:00:04 +0000 (15:00 +0900)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:48 +0000 (19:35 +0100)
drivers/usb/usbport/usb2.c

index 1811b54..edc91c1 100644 (file)
@@ -251,13 +251,11 @@ USB2_GetStartTime(IN PUSB2_TT_ENDPOINT nextTtEndpoint,
 
     TransferType = TtEndpoint->TtEndpointParams.TransferType;
 
-    if (nextTtEndpoint && TransferType == USBPORT_TRANSFER_TYPE_ISOCHRONOUS)
-    {
-        return nextTtEndpoint->StartTime + nextTtEndpoint->CalcBusTime;
-    }
-
     if (TransferType == USBPORT_TRANSFER_TYPE_ISOCHRONOUS)
     {
+        if (nextTtEndpoint)
+            return nextTtEndpoint->StartTime + nextTtEndpoint->CalcBusTime;
+
         ttEndpoint = TtEndpoint->Tt->FrameBudget[Frame].AltEndpoint;
 
         if (ttEndpoint)