https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71a4462ad5dce284d47bc307a4b86638f990e56a

commit 71a4462ad5dce284d47bc307a4b86638f990e56a
Author:     Thomas Faber <thomas.fa...@reactos.org>
AuthorDate: Fri Mar 8 15:49:22 2019 +0100
Commit:     Thomas Faber <thomas.fa...@reactos.org>
CommitDate: Fri May 1 12:05:12 2020 +0200

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

Reply via email to