Author: tfaber
Date: Sat Sep 2 09:03:07 2017
New Revision: 75737
URL:
http://svn.reactos.org/svn/reactos?rev=75737&view=rev
Log:
[USBPORT]
- Avoid unnecessary duplicate variables in USBPORT_FlushPendingTransfers
Modified:
trunk/reactos/drivers/usb/usbport/queue.c
Modified: trunk/reactos/drivers/usb/usbport/queue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbport/queue.…
==============================================================================
--- trunk/reactos/drivers/usb/usbport/queue.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbport/queue.c [iso-8859-1] Sat Sep 2 09:03:07 2017
@@ -759,10 +759,8 @@
BOOLEAN IsEnd = FALSE;
PLIST_ENTRY List;
PUSBPORT_TRANSFER Transfer;
- KIRQL PrevIrql;
PURB Urb;
PIRP Irp;
- PIRP irp;
KIRQL OldIrql;
BOOLEAN Result;
@@ -877,11 +875,9 @@
Transfer->TransferLink.Flink = NULL;
Transfer->TransferLink.Blink = NULL;
- irp = Irp;
-
if (Irp)
{
- irp = USBPORT_RemovePendingTransferIrp(FdoDevice, Irp);
+ Irp = USBPORT_RemovePendingTransferIrp(FdoDevice, Irp);
}
KeReleaseSpinLockFromDpcLevel(&Endpoint->EndpointSpinLock);
@@ -890,13 +886,13 @@
KeAcquireSpinLock(&FdoExtension->FlushTransferSpinLock, &OldIrql);
- if (irp)
- {
- IoSetCancelRoutine(irp, USBPORT_CancelActiveTransferIrp);
-
- if (Irp->Cancel && IoSetCancelRoutine(irp, NULL))
+ if (Irp)
+ {
+ IoSetCancelRoutine(Irp, USBPORT_CancelActiveTransferIrp);
+
+ if (Irp->Cancel && IoSetCancelRoutine(Irp, NULL))
{
- DPRINT_CORE("USBPORT_FlushPendingTransfers: irp - %p\n", irp);
+ DPRINT_CORE("USBPORT_FlushPendingTransfers: irp - %p\n", Irp);
KeReleaseSpinLock(&FdoExtension->FlushTransferSpinLock,
OldIrql);
@@ -905,8 +901,8 @@
goto Worker;
}
- USBPORT_FindUrbInIrpTable(FdoExtension->ActiveIrpTable, Urb, irp);
- USBPORT_InsertIrpInTable(FdoExtension->ActiveIrpTable, irp);
+ USBPORT_FindUrbInIrpTable(FdoExtension->ActiveIrpTable, Urb, Irp);
+ USBPORT_InsertIrpInTable(FdoExtension->ActiveIrpTable, Irp);
}
IsMapTransfer = USBPORT_QueueActiveUrbToEndpoint(Endpoint, Urb);
@@ -920,9 +916,9 @@
}
Worker:
- KeRaiseIrql(DISPATCH_LEVEL, &PrevIrql);
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
Result = USBPORT_EndpointWorker(Endpoint, FALSE);
- KeLowerIrql(PrevIrql);
+ KeLowerIrql(OldIrql);
if (Result)
USBPORT_InvalidateEndpointHandler(FdoDevice,