[USBHUB] Move DPRINT after check Status. 282/head
authorVadim Galyant <vgal@rambler.ru>
Sat, 6 Jan 2018 03:48:37 +0000 (12:48 +0900)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 10 Jan 2018 17:59:23 +0000 (18:59 +0100)
drivers/usb/usbhub_new/pnp.c

index a6dd9cc..f437752 100644 (file)
@@ -1136,10 +1136,6 @@ EnumStart:
     {
         PortData = &HubExtension->PortData[Port - 1];
 
-        DPRINT_ENUM("USBH_FdoQueryBusRelations: Port - %x, ConnectStatus - %x\n",
-                    Port,
-                    PortData->PortStatus.PortStatus.Usb20PortStatus.CurrentConnectStatus);
-
         if (HubExtension->HubFlags & USBHUB_FDO_FLAG_DEVICE_FAILED)
         {
             continue;
@@ -1152,11 +1148,16 @@ EnumStart:
 
         if (!NT_SUCCESS(Status))
         {
+            DPRINT_ENUM("USBH_FdoQueryBusRelations: Status - %X\n", Status);
             HubExtension->HubFlags |= USBHUB_FDO_FLAG_DEVICE_FAILED;
             DeviceRelations->Count = 0;
             goto EnumStart;
         }
 
+        DPRINT_ENUM("USBH_FdoQueryBusRelations: Port - %x, ConnectStatus - %x\n",
+                    Port,
+                    PortData->PortStatus.PortStatus.Usb20PortStatus.CurrentConnectStatus);
+
         PdoDevice = PortData->DeviceObject;
 
         if (PortData->DeviceObject)