[USBHUB_NEW] Fix inverted check in USBH_RestoreDevice.
authorThomas Faber <thomas.faber@reactos.org>
Mon, 1 Apr 2019 12:04:56 +0000 (14:04 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 14 Apr 2019 13:32:16 +0000 (15:32 +0200)
This allows re-enabling a disabled device.

drivers/usb/usbhub_new/pnp.c

index c186257..723c106 100644 (file)
@@ -2068,7 +2068,7 @@ USBH_RestoreDevice(IN PUSBHUB_PORT_PDO_EXTENSION PortExtension,
     ASSERT(PortExtension->PortNumber > 0);
     PortData = &HubExtension->PortData[PortExtension->PortNumber - 1];
 
     ASSERT(PortExtension->PortNumber > 0);
     PortData = &HubExtension->PortData[PortExtension->PortNumber - 1];
 
-    if (PortExtension->Common.SelfDevice == PortData->DeviceObject)
+    if (PortExtension->Common.SelfDevice != PortData->DeviceObject)
     {
         Status = STATUS_UNSUCCESSFUL;
         return Status;
     {
         Status = STATUS_UNSUCCESSFUL;
         return Status;