Commit 0b9d1d9f authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

wineusb.sys: Return STATUS_DELETE_PENDING when device is removed.

parent 84c9206c
......@@ -726,9 +726,21 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device_obj, IRP *irp
ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
struct usb_device *device = device_obj->DeviceExtension;
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
BOOL removed;
TRACE("device_obj %p, irp %p, code %#x.\n", device_obj, irp, code);
EnterCriticalSection(&wineusb_cs);
removed = device->removed;
LeaveCriticalSection(&wineusb_cs);
if (removed)
{
irp->IoStatus.Status = STATUS_DELETE_PENDING;
IoCompleteRequest(irp, IO_NO_INCREMENT);
return STATUS_DELETE_PENDING;
}
switch (code)
{
case IOCTL_INTERNAL_USB_SUBMIT_URB:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment