From 71a4462ad5dce284d47bc307a4b86638f990e56a Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Fri, 8 Mar 2019 15:49:22 +0100 Subject: [PATCH] [USBCCGP] Ignore IRP_MN_REMOVE_DEVICE return status and don't wait for it to complete. --- drivers/usb/usbccgp/fdo.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/usb/usbccgp/fdo.c b/drivers/usb/usbccgp/fdo.c index f3b3c6ec41a..abcaeb017f3 100644 --- a/drivers/usb/usbccgp/fdo.c +++ b/drivers/usb/usbccgp/fdo.c @@ -397,16 +397,15 @@ FDO_HandlePnp( FDO_CloseConfiguration(DeviceObject); /* Send the IRP down the stack */ - Status = USBCCGP_SyncForwardIrp(FDODeviceExtension->NextDeviceObject, - Irp); - if (NT_SUCCESS(Status)) - { - /* Detach from the device stack */ - IoDetachDevice(FDODeviceExtension->NextDeviceObject); + Irp->IoStatus.Status = STATUS_SUCCESS; + IoSkipCurrentIrpStackLocation(Irp); + Status = IoCallDriver(FDODeviceExtension->NextDeviceObject, Irp); - /* Delete the device object */ - IoDeleteDevice(DeviceObject); - } + /* Detach from the device stack */ + IoDetachDevice(FDODeviceExtension->NextDeviceObject); + + /* Delete the device object */ + IoDeleteDevice(DeviceObject); /* Request completed */ break;