[USBCCGP] Do not try to unconfigure a device that is not configured.

Fixes handling failed IRP_MN_START_DEVICE.
This commit is contained in:
Thomas Faber 2019-03-03 18:24:44 +01:00
parent 6122f3f436
commit 528fc589c0
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View 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);