Author: janderwald
Date: Tue Dec 4 05:13:22 2012
New Revision: 57796
URL:
http://svn.reactos.org/svn/reactos?rev=57796&view=rev
Log:
- Set SurpriseRemovalOK flag when IRP_MN_QUERY_CAPABILITIES was handled successfully
- CORE-6447
Modified:
trunk/reactos/drivers/hid/hidusb/hidusb.c
Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
==============================================================================
--- trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] Tue Dec 4 05:13:22 2012
@@ -1686,10 +1686,13 @@
Status = Irp->IoStatus.Status;
}
- //
- // don't need to safely remove
- //
- IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK
= TRUE;
+ if (NT_SUCCESS(Status) &&
IoStack->Parameters.DeviceCapabilities.Capabilities != NULL)
+ {
+ //
+ // don't need to safely remove
+ //
+
IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE;
+ }
//
// done