[USBCCGP] Do not try to unconfigure a device that is not configured.
authorThomas Faber <thomas.faber@reactos.org>
Sun, 3 Mar 2019 17:24:44 +0000 (18:24 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 14 Apr 2019 13:32:12 +0000 (15:32 +0200)
Fixes handling failed IRP_MN_START_DEVICE.

drivers/usb/usbccgp/fdo.c

index 7916e8a..927d19e 100644 (file)
@@ -338,6 +338,13 @@ FDO_CloseConfiguration(
     FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
     ASSERT(FDODeviceExtension->Common.IsFDO);
 
+    /* Nothing to do if we're not configured */
+    if (FDODeviceExtension->ConfigurationDescriptor == NULL ||
+        FDODeviceExtension->InterfaceList == NULL)
+    {
+        return STATUS_SUCCESS;
+    }
+
     /* Now allocate the urb */
     Urb = USBD_CreateConfigurationRequestEx(FDODeviceExtension->ConfigurationDescriptor,
                                             FDODeviceExtension->InterfaceList);