[USBCCGP] Ignore IRP_MN_REMOVE_DEVICE return status and don't wait for it to complete.

This commit is contained in:
Thomas Faber 2019-03-08 15:49:22 +01:00
parent 823101274a
commit 71a4462ad5
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -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;