- Do not assert on failed devices
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 4 Dec 2012 04:34:12 +0000 (04:34 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 4 Dec 2012 04:34:12 +0000 (04:34 +0000)
- CORE-6794

svn path=/trunk/; revision=57794

reactos/drivers/hid/hidusb/hidusb.c

index a227d09..a805012 100644 (file)
@@ -1508,18 +1508,20 @@ Hid_PnpStart(
         // select configuration
         //
         Status = Hid_SelectConfiguration(DeviceObject);
         // select configuration
         //
         Status = Hid_SelectConfiguration(DeviceObject);
-        ASSERT(Status == STATUS_SUCCESS);
 
         //
         // done
         //
         DPRINT("[HIDUSB] SelectConfiguration %x\n", Status);
 
 
         //
         // done
         //
         DPRINT("[HIDUSB] SelectConfiguration %x\n", Status);
 
-        //
-        // get protocol
-        //
-        Hid_GetProtocol(DeviceObject);
-        return Status;
+        if (NT_SUCCESS(Status))
+        {
+            //
+            // get protocol
+            //
+            Hid_GetProtocol(DeviceObject);
+            return Status;
+        }
     }
 
     //
     }
 
     //