https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45741cdf3a94817a5c651…
commit 45741cdf3a94817a5c6515df5eac4a7417d6938d
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Wed Oct 11 17:15:46 2017 +0200
[USBPORT] Remove unnecessary null check in USBPORT_HandleSubmitURB (CID 1419367).
---
drivers/usb/usbport/urb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/usbport/urb.c b/drivers/usb/usbport/urb.c
index a9d7d07977..079206896b 100644
--- a/drivers/usb/usbport/urb.c
+++ b/drivers/usb/usbport/urb.c
@@ -1056,10 +1056,7 @@ USBPORT_HandleSubmitURB(IN PDEVICE_OBJECT PdoDevice,
ExFreePoolWithTag(Transfer, USB_PORT_TAG);
}
- if (DeviceHandle)
- {
- InterlockedDecrement(&DeviceHandle->DeviceHandleLock);
- }
+ InterlockedDecrement(&DeviceHandle->DeviceHandleLock);
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);