Skip to content

Commit ed9f0dc

Browse files
SergeGautherieExtravert-ir
authored andcommitted
[USBPORT] USBPORT_InvalidateEndpointHandler(): Properly enumerate endpoints
1 parent 220bc82 commit ed9f0dc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/usb/usbport/endpoint.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,9 +1357,9 @@ USBPORT_InvalidateEndpointHandler(IN PDEVICE_OBJECT FdoDevice,
13571357
{
13581358
KeAcquireSpinLock(&FdoExtension->EndpointListSpinLock, &OldIrql);
13591359

1360-
Entry = &FdoExtension->EndpointList;
1361-
1362-
while (Entry && Entry != &FdoExtension->EndpointList)
1360+
for (Entry = FdoExtension->EndpointList.Flink;
1361+
Entry && Entry != &FdoExtension->EndpointList;
1362+
Entry = Entry->Flink)
13631363
{
13641364
endpoint = CONTAINING_RECORD(Entry,
13651365
USBPORT_ENDPOINT,
@@ -1376,8 +1376,6 @@ USBPORT_InvalidateEndpointHandler(IN PDEVICE_OBJECT FdoDevice,
13761376
IsAddEntry = TRUE;
13771377
}
13781378
}
1379-
1380-
Entry = endpoint->EndpointLink.Flink;
13811379
}
13821380

13831381
KeReleaseSpinLock(&FdoExtension->EndpointListSpinLock, OldIrql);

0 commit comments

Comments
 (0)